mirror of
https://gerrit.googlesource.com/git-repo
synced 2024-12-21 07:16:21 +00:00
Make 'repo status' show the branch you are currently on
Signed-off-by: Shawn O. Pearce <sop@google.com>
This commit is contained in:
parent
3d2cdd0ea5
commit
8bd5e60b16
@ -64,6 +64,19 @@ the following meanings:
|
||||
all = self.GetProjects(args)
|
||||
clean = 0
|
||||
|
||||
on = {}
|
||||
for project in all:
|
||||
cb = project.CurrentBranch
|
||||
if cb:
|
||||
if cb not in on:
|
||||
on[cb] = []
|
||||
on[cb].append(project)
|
||||
|
||||
branch_names = list(on.keys())
|
||||
branch_names.sort()
|
||||
for cb in branch_names:
|
||||
print '# on branch %s' % cb
|
||||
|
||||
for project in all:
|
||||
state = project.PrintWorkTreeStatus()
|
||||
if state == 'CLEAN':
|
||||
|
Loading…
Reference in New Issue
Block a user