mirror of
https://gerrit.googlesource.com/git-repo
synced 2025-06-19 12:34:17 +00:00
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>
This commit is contained in:
@ -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)'
|
||||
|
Reference in New Issue
Block a user