diff --git a/project.py b/project.py index d2ec34fe..bd35c65e 100644 --- a/project.py +++ b/project.py @@ -352,7 +352,7 @@ class Project(object): df = self.work_git.DiffZ('diff-files') do = self.work_git.LsOthers() if not di and not df and not do: - return + return 'CLEAN' out = StatusColoring(self.config) out.project('project %-40s', self.relpath + '/') @@ -400,6 +400,7 @@ class Project(object): else: out.write('%s', line) out.nl() + return 'DIRTY' def PrintWorkTreeDiff(self): """Prints the status of the repository to stdout. 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)'