summaryrefslogtreecommitdiff
path: root/plugins/git-prompt/gitstatus.py
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/git-prompt/gitstatus.py')
-rw-r--r--plugins/git-prompt/gitstatus.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/plugins/git-prompt/gitstatus.py b/plugins/git-prompt/gitstatus.py
index b5c3c9a0c..94774d828 100644
--- a/plugins/git-prompt/gitstatus.py
+++ b/plugins/git-prompt/gitstatus.py
@@ -44,7 +44,7 @@ if po.returncode != 0:
sys.exit(0) # Not a git repository
# collect git status information
-untracked, staged, changed, conflicts = [], [], [], []
+untracked, staged, changed, deleted, conflicts = [], [], [], [], []
ahead, behind = 0, 0
status = [(line[0], line[1], line[2:]) for line in stdout.decode('utf-8').splitlines()]
for st in status:
@@ -75,13 +75,15 @@ for st in status:
else:
if st[1] == 'M':
changed.append(st)
+ if st[1] == 'D':
+ deleted.append(st)
if st[0] == 'U':
conflicts.append(st)
elif st[0] != ' ':
staged.append(st)
stashed = get_stash()
-if not changed and not staged and not conflicts and not untracked:
+if not changed and not deleted and not staged and not conflicts and not untracked:
clean = 1
else:
clean = 0
@@ -95,6 +97,7 @@ out = ' '.join([
str(len(changed)),
str(len(untracked)),
str(stashed),
- str(clean)
+ str(clean),
+ str(len(deleted))
])
print(out, end='')