From f95d5b5cefa40f9c69b6b75cacc1726a3cfa0c4c Mon Sep 17 00:00:00 2001 From: Kentaro Wada Date: Mon, 29 Jun 2015 01:21:26 +0900 Subject: [PATCH] [gitstatus.py] Simplify to count file statuses --- gitstatus.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/gitstatus.py b/gitstatus.py index 9fd84caf..79cb5d97 100755 --- a/gitstatus.py +++ b/gitstatus.py @@ -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 @@ -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='')