[meld/meld-3-18] vc.git: Fix committing a folder in git



commit 6efc76983d82e7dca04c1b2c4ea5b1a0ae25f42d
Author: Kai Willadsen <kai willadsen gmail com>
Date:   Fri Jun 8 08:46:26 2018 +1000

    vc.git: Fix committing a folder in git

 meld/vc/git.py | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/meld/vc/git.py b/meld/vc/git.py
index ce82ff20..9165d9f4 100644
--- a/meld/vc/git.py
+++ b/meld/vc/git.py
@@ -127,8 +127,11 @@ class Vc(_vc.Vc):
         files = []
         for p in paths:
             if os.path.isdir(p):
-                entries = self._get_modified_files(p)
-                names = [self.DIFF_RE.search(e).groups()[5] for e in entries]
+                cached_entries, entries = self._get_modified_files(p)
+                all_entries = set(entries + cached_entries)
+                names = [
+                    self.DIFF_RE.search(e).groups()[5] for e in all_entries
+                ]
                 files.extend(names)
             else:
                 files.append(os.path.relpath(p, self.root))


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