GNOME Bugzilla – Bug 663050
Fails to work with git repository when git's diff.mnemonicprefix config is true
Last modified: 2011-11-15 20:03:34 UTC
Created attachment 200282 [details] [review] Patch to support git with diff.mnemonicprefix=true If the git config setting diff.mnemonicprefix is set, that causes git diff to use prefixes that indicate what is being compared rather than always using "a" and "b". For the way that meld invokes git diff, the prefixes will always be "c" for commit (HEAD) and and "w" for the work tree. This confuses the patch parser and prevents the modified files from being copied to the temporary directory, which then results in patch failing to reverse the changes. I'm attaching a small patch to fix this. I just modified the regular expression used to find index entries in the patch to accept "c" and "w" as prefixes as well as "a" and "b".
Thanks for the patch. I've pushed the fix. In future, if you could attach git format-patch patches with the full commit details, that would be even more awesome. You can see that I've basically just reused your already-excellent bug description as the commit message in the commit: http://git.gnome.org/browse/meld/commit/?id=d3530fa9c90247148c05d01e94f4bc763c37f3b4 and attaching a format-patch style commit makes that even easier. Thanks!