summaryrefslogtreecommitdiff
path: root/subcmds/branches.py
diff options
context:
space:
mode:
authorShawn O. Pearce <sop@google.com>2009-04-18 15:18:35 -0700
committerShawn O. Pearce <sop@google.com>2009-04-18 15:18:35 -0700
commit4e3d6739a17dcc9efc5adb1d915be0a886db700e (patch)
tree6338654fb30ced3fe92b83f1d4e724ee416cf633 /subcmds/branches.py
parent552ac89929db1794200290550dccdd7f3078d13f (diff)
downloadgit-repo-4e3d6739a17dcc9efc5adb1d915be0a886db700e.tar.gz
git-repo-4e3d6739a17dcc9efc5adb1d915be0a886db700e.zip
Print '(no branches)' if the output of `repo branches` is empty
This way its clear the command did something, and reported that it had nothing to show you, because you have no active branches in this client. Signed-off-by: Shawn O. Pearce <sop@google.com>
Diffstat (limited to 'subcmds/branches.py')
-rw-r--r--subcmds/branches.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/subcmds/branches.py b/subcmds/branches.py
index d5a0812fb..57d8c88aa 100644
--- a/subcmds/branches.py
+++ b/subcmds/branches.py
@@ -96,6 +96,10 @@ Summarizes the currently available topic branches.
n.append(name)
names = n
+ if not names:
+ print >>sys.stderr, ' (no branches)'
+ return
+
width = 25
for name in names:
if width < len(name):