From 6d8bbd16bd72cf1c1ba8384d46a6beda23b3cb81 Mon Sep 17 00:00:00 2001 From: David Aguilar Date: Thu, 20 Nov 2008 12:40:23 -0800 Subject: [PATCH] models: properly detect merge conflicts with deleted files When a file is deleted locally and changed on the remote side diff-index reports the state as 'A' (added) since it's going to add it during the merge. We now detect this and list it as an unmerged file. Signed-off-by: David Aguilar --- cola/models.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cola/models.py b/cola/models.py index 2c64c707..7cb9a7f5 100644 --- a/cola/models.py +++ b/cola/models.py @@ -856,6 +856,8 @@ class Model(model.Model): name = eval_path(name) if status == 'M' or status == 'D': modified.append(name) + elif status == 'A': + unmerged.append(name) except: # handle git init for name in (self.git.ls_files(modified=True, z=True) @@ -879,6 +881,8 @@ class Model(model.Model): self.partially_staged.add(name) elif status == 'A': staged.append(name) + if name in unmerged: + unmerged.remove(name) elif status == 'D': staged.append(name) modified.remove(name) -- 2.11.4.GIT