Skip to content

Commit f95d5b5

Browse files
committed
[gitstatus.py] Simplify to count file statuses
1 parent a9b0aae commit f95d5b5

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

gitstatus.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,6 @@
3535
conflicts.append(st)
3636
elif st[0] != ' ':
3737
staged.append(st)
38-
n_staged = len(staged)
39-
n_changed = len(changed)
40-
n_conflicts = len(conflicts)
41-
n_untracked = len(untracked)
4238

4339
ahead, behind = 0,0
4440

@@ -64,10 +60,10 @@
6460
branch,
6561
str(ahead),
6662
str(behind),
67-
str(n_staged),
68-
str(n_conflicts),
69-
str(n_changed),
70-
str(n_untracked),
63+
str(len(staged)),
64+
str(len(conflicts)),
65+
str(len(changed)),
66+
str(len(untracked)),
7167
])
7268
print(out, end='')
7369

0 commit comments

Comments
 (0)