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 611744 - meld fails to diff a single file when that file is in a git repo subdirectory.
meld fails to diff a single file when that file is in a git repo subdirectory.
Status: RESOLVED FIXED
Product: meld
Classification: Other
Component: filediff
1.3.x
Other Linux
: Normal normal
: ---
Assigned To: Kai Willadsen
Stephen Kennedy
Depends on:
Blocks:
 
 
Reported: 2010-03-03 21:26 UTC by Philippe Chaintreuil
Modified: 2010-03-12 07:38 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch (1.10 KB, patch)
2010-03-10 23:01 UTC, Kai Willadsen
none Details | Review

Description Philippe Chaintreuil 2010-03-03 21:26:56 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).
Comment 1 Kai Willadsen 2010-03-10 23:01:32 UTC
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.
Comment 2 Philippe Chaintreuil 2010-03-11 23:32:40 UTC
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!
Comment 3 Kai Willadsen 2010-03-12 07:38:34 UTC
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.