From 161f445a4dc4518199b132ee4c380788aee2ac63 Mon Sep 17 00:00:00 2001 From: "Shawn O. Pearce" Date: Fri, 10 Apr 2009 17:41:44 -0700 Subject: 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 --- subcmds/status.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'subcmds/status.py') 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): """ def Execute(self, opt, args): - for project in self.GetProjects(args): - project.PrintWorkTreeStatus() + all = self.GetProjects(args) + clean = 0 + + for project in all: + state = project.PrintWorkTreeStatus() + if state == 'CLEAN': + clean += 1 + if len(all) == clean: + print 'nothing to commit (working directory clean)' -- cgit v1.2.3-54-g00ecf