Skip to content

Commit

Permalink
[gitstatus.py] Simplify to count file statuses
Browse files Browse the repository at this point in the history
  • Loading branch information
wkentaro committed Jun 28, 2015
1 parent a9b0aae commit f95d5b5
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions gitstatus.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,6 @@
conflicts.append(st)
elif st[0] != ' ':
staged.append(st)
n_staged = len(staged)
n_changed = len(changed)
n_conflicts = len(conflicts)
n_untracked = len(untracked)

ahead, behind = 0,0

Expand All @@ -64,10 +60,10 @@
branch,
str(ahead),
str(behind),
str(n_staged),
str(n_conflicts),
str(n_changed),
str(n_untracked),
str(len(staged)),
str(len(conflicts)),
str(len(changed)),
str(len(untracked)),
])
print(out, end='')

0 comments on commit f95d5b5

Please sign in to comment.