GNOME Bugzilla – Bug 611744
meld fails to diff a single file when that file is in a git repo subdirectory.
Last modified: 2010-03-12 07:38:34 UTC
If you have a git repo with a layout like: ./.git/ ./readme.txt ./src/ ./src/main.c if you are in the ./src/ folder, modify main.c, and then run "meld main.c" (while still in that ./src/ folder), you get an error: ----------------------------------------------------------------------------- Invoking 'patch' failed. Maybe you don't have 'GNU patch' installed, or you use an untested version of Git. Please send email bug report to: meld-list@gnome.org Containing the following information: - meld version: '1.3.0' - source control software type: 'Git' - source control software version: 'X.Y.Z' - the output of 'git diff HEAD somefile.txt' - patch command: 'patch --strip=1 --reverse --directory=/tmp/tmpq2xeI_-meld' ----------------------------------------------------------------------------- If you cd .. (back to ./) and run meld ./src/main.c, everything works as expected. The output of 'git diff HEAD ChangeLog' (from meld's git repo: help/ChangeLog): ----------------------------------------------------------------------------- diff --git a/help/ChangeLog b/help/ChangeLog index 0a348c1..87f1a12 100644 --- a/help/ChangeLog +++ b/help/ChangeLog @@ -1,3 +1,7 @@ +2010-03-03 Philippe Chaintreuil <i_get_enough_spam_thanks@parallaxshift.com> + + * help/ChangeLog: A change that will never be checked in. + 2009-04-19 Mario Blättermann <mariobl@gnome.org> * de/de.po: Added German translation. ----------------------------------------------------------------------------- My git version: 1.6.4.4 This also happens with the latest version from git (a51bc48151a9eb9b4bf1964f8937181af587835d).
Created attachment 155796 [details] [review] Patch This patch fixes the issue for me by always requesting a relative path from git-diff. It doesn't break anything for me, but wider testing would be appreciated.
I've just messed around with your patch for 5 minutes, trying various relative paths and directories and my original test, etc. Seems to work for me! I like it!
Thanks for the testing. I've pushed the patch. This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.