diff options
| -rw-r--r-- | project.py | 3 | ||||
| -rw-r--r-- | subcmds/status.py | 11 |
2 files changed, 11 insertions, 3 deletions
| @@ -352,7 +352,7 @@ class Project(object): | |||
| 352 | df = self.work_git.DiffZ('diff-files') | 352 | df = self.work_git.DiffZ('diff-files') |
| 353 | do = self.work_git.LsOthers() | 353 | do = self.work_git.LsOthers() |
| 354 | if not di and not df and not do: | 354 | if not di and not df and not do: |
| 355 | return | 355 | return 'CLEAN' |
| 356 | 356 | ||
| 357 | out = StatusColoring(self.config) | 357 | out = StatusColoring(self.config) |
| 358 | out.project('project %-40s', self.relpath + '/') | 358 | out.project('project %-40s', self.relpath + '/') |
| @@ -400,6 +400,7 @@ class Project(object): | |||
| 400 | else: | 400 | else: |
| 401 | out.write('%s', line) | 401 | out.write('%s', line) |
| 402 | out.nl() | 402 | out.nl() |
| 403 | return 'DIRTY' | ||
| 403 | 404 | ||
| 404 | def PrintWorkTreeDiff(self): | 405 | def PrintWorkTreeDiff(self): |
| 405 | """Prints the status of the repository to stdout. | 406 | """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): | |||
| 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)' | ||
