[meld] Request relative paths when getting git patches (closes bgo#611744)



commit 1cb8800533e234022e3edea6b1e678cb07187d1f
Author: Kai Willadsen <kai willadsen gmail com>
Date:   Thu Mar 11 08:53:54 2010 +1000

    Request relative paths when getting git patches (closes bgo#611744)
    
    Git by default gives all paths as relative to the repository base
    directory, which breaks our current vc patching machinery. This patch
    changes our git backend to ask for relative paths, fixing invocations of
    Meld on git-versioned files while in subdirectories (e.g., cd src; meld
    ./foo.c instead of meld src/foo.c).

 meld/vc/git.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/meld/vc/git.py b/meld/vc/git.py
index 6fafa16..479710b 100644
--- a/meld/vc/git.py
+++ b/meld/vc/git.py
@@ -56,7 +56,7 @@ class Vc(_vc.CachedVc):
     def commit_command(self, message):
         return [self.CMD,"commit","-m",message]
     def diff_command(self):
-        return [self.CMD,"diff","HEAD"]
+        return [self.CMD, "diff", "--relative", "HEAD"]
     def update_command(self):
         return [self.CMD,"pull"]
     def add_command(self, binary=0):



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]