Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [RFC/PATCH] git-gui: Use gitattribute "encoding" for file content display

From: Shawn O. Pearce <hidden>
Date: 2016-06-15 22:44:08

Pedro Melo [off-list ref] wrote:
On Jan 23, 2008, at 5:47 AM, Shawn O. Pearce wrote:
quoted
I've got the following change in my "pu" right now and am considering
adding it to git-gui 0.9.2, which would be in git 1.5.4.
Spoke too soon.

I can see the UTF-8 chars in the diffs, but if I use Stage Hunk for  
Commit in a hunk with accentuated utf-8 chars, git-gui will throw an  
error like "patch does not apply".
Yea, I know why.  It actually kept me awake for a little bit last
night after I sent the patch out for comment, but wasn't big enough
to get me out of bed to fix it.

The issue is git-gui doesn't convert back from character data to
binary correctly, so the patch won't apply, as the context will
not match.  Its simple enough to fix, we just have to remember
the encoding we used to go from git-diff --> Tcl and use that
same encoding in the other direction (Tcl --> git-apply).

-- 
Shawn.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help