summaryrefslogtreecommitdiffstats
path: root/subcmds/status.py
diff options
context:
space:
mode:
authorShawn O. Pearce <sop@google.com>2009-04-10 17:41:44 -0700
committerShawn O. Pearce <sop@google.com>2009-04-10 19:01:08 -0700
commit161f445a4dc4518199b132ee4c380788aee2ac63 (patch)
tree5fad9f5ba60ed8915614163e8d8e5c72135347ab /subcmds/status.py
parent68194f42b0b0e59f206b8e997c26f6a16b74fd4f (diff)
downloadgit-repo-161f445a4dc4518199b132ee4c380788aee2ac63.tar.gz
status: tell the user the working tree is clean
If there is nothing output at all, tell the user the working tree is completely clean. It just gives them a bit more of a warm-fuzzy feeling knowing repo and until the end. It also more closely matches with the output of git status. Signed-off-by: Shawn O. Pearce <sop@google.com>
Diffstat (limited to 'subcmds/status.py')
-rw-r--r--subcmds/status.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/subcmds/status.py b/subcmds/status.py
index 1615b423..853f1508 100644
--- a/subcmds/status.py
+++ b/subcmds/status.py
@@ -23,5 +23,12 @@ class Status(PagedCommand):
23""" 23"""
24 24
25 def Execute(self, opt, args): 25 def Execute(self, opt, args):
26 for project in self.GetProjects(args): 26 all = self.GetProjects(args)
27 project.PrintWorkTreeStatus() 27 clean = 0
28
29 for project in all:
30 state = project.PrintWorkTreeStatus()
31 if state == 'CLEAN':
32 clean += 1
33 if len(all) == clean:
34 print 'nothing to commit (working directory clean)'