Re: [PATCH (GITK)] gitk: Fix commit encoding support.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Alexander Gavrilov writes:

> +proc do_readcommit {id} {
> +    global tclencoding
> +
> +    # Invoke git-log to handle automatic encoding conversion
> +    set fd [open [concat | git log --no-color --pretty=raw -1 $id] r]
> +    # Read the results using i18n.logoutputencoding
> +    fconfigure $fd -translation lf -eofchar {}
> +    if {$tclencoding != {}} {
> +	fconfigure $fd -encoding $tclencoding

Does this mean there are two conversions going on, one inside git log
and another inside Tcl?  Is there a reason why it's better to do two
conversions than one, or is it just more convenient that way?

Would an alternative approach have been to read the output of git
cat-file with -translation binary, look for an encoding header, and do
an encoding convertfrom based on the encoding header?  What would be
the disadvantage of such an approach?

Paul.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux