[meld] vc.git: Fix the missing cache sometimes getting relative paths
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld] vc.git: Fix the missing cache sometimes getting relative paths
- Date: Fri, 26 Feb 2016 23:01:20 +0000 (UTC)
commit 30a3bd2dd1f661b5be10c8aed6b425b25eb0eac9
Author: Kai Willadsen <kai willadsen gmail com>
Date: Sat Feb 27 08:32:02 2016 +1000
vc.git: Fix the missing cache sometimes getting relative paths
Specifically, top-level entries in the repository would always have
relative paths put into the missing cache. The meta cache already dealt
with this (albeit weirdly) but now both should have a consistent story
going on.
meld/vc/git.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/meld/vc/git.py b/meld/vc/git.py
index 17ce012..1dc3b29 100644
--- a/meld/vc/git.py
+++ b/meld/vc/git.py
@@ -344,7 +344,8 @@ class Vc(_vc.Vc):
columns = self.DIFF_RE.search(entry).groups()
old_mode, new_mode, old_sha, new_sha, statekey, path = columns
state = self.state_map.get(statekey.strip(), _vc.STATE_NONE)
- self._tree_cache[get_real_path(path)] = state
+ path = get_real_path(path)
+ self._tree_cache[path] = state
# Git entries can't be MISSING; that's just an unstaged REMOVED
self._add_missing_cache_entry(path, state)
if old_mode != new_mode:
@@ -359,7 +360,7 @@ class Vc(_vc.Vc):
_("Partially staged") if path in unstaged else _("Staged"))
for path, msgs in tree_meta_cache.items():
- self._tree_meta_cache[get_real_path(path)] = "; ".join(msgs)
+ self._tree_meta_cache[path] = "; ".join(msgs)
for path in ignored_entries:
self._tree_cache[get_real_path(path)] = _vc.STATE_IGNORED
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]