After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 663050 - Fails to work with git repository when git's diff.mnemonicprefix config is true
Fails to work with git repository when git's diff.mnemonicprefix config is true
Status: RESOLVED FIXED
Product: meld
Classification: Other
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: meld-maint
meld-maint
Depends on:
Blocks:
 
 
Reported: 2011-10-30 15:24 UTC by Aaron Schrab
Modified: 2011-11-15 20:03 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to support git with diff.mnemonicprefix=true (430 bytes, patch)
2011-10-30 15:24 UTC, Aaron Schrab
none Details | Review

Description Aaron Schrab 2011-10-30 15:24:57 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".
Comment 1 Kai Willadsen 2011-11-15 20:03:34 UTC
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!