I'm using git-gui on Windows Vista (via msysgit), and I'm trying to make the diff area (the yellow one) display changes in office files (eg .xlsx - they are really zipped up .xml files)
In C:\Users\Daniel\
.gitconfig
[diff "zip"]
textconv = unzip -c -a
In repository: (As a side note, I'd rather have this in C:\Users\Daniel, what should I do?)
.gitattributes
*.xlsx diff=zip
After committing an .xlsx file, changing it and rescanning, I get this message:
Binary files a/notes/GaussianMountain.xls开发者_运维技巧x and b/notes/GaussianMountain.xlsx differ
Instead of an output listing the changes made! What's wrong?
Update: it seems from the comments below that the problem for the questioner was needing a later version of git-gui / msysGit. However, there are a couple of other problems I had while trying to reproduce the issue, which are described below.
I think I managed to reproduce this: the problem seems to be that I had the checkbox "Use TextConv For Diffs and Blames" selected in Git Gui's Edit > Options...
dialog. When I turned off that option, it worked fine -- counterintuitively, to my mind, although that's also documented on the TextConv page on the git wiki.
The other problem I had was that the converter I was testing with (strings) wasn't on my path, so I had to put a full path in my .gitconfig:
[diff "stringify"]
textconv = c:/cygwin/bin/strings.exe
However, if this had been the problem for you I don't think you would have seen the "Binary files A and B differ" message at all, so I suspect it's the former causing the problem.
精彩评论