Make 'git cl status' report the current branch even if there's no active CL.
TBR=ianh@google.com
Review URL: https://codereview.chromium.org/1263253002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@296187 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/git_cl.py b/git_cl.py
index e46b660..68d4339 100755
--- a/git_cl.py
+++ b/git_cl.py
@@ -795,7 +795,7 @@
if upstream_git_obj is None:
if self.GetBranch() is None:
print >> sys.stderr, (
- 'ERROR: unable to dertermine current branch (detached HEAD?)')
+ 'ERROR: unable to determine current branch (detached HEAD?)')
else:
print >> sys.stderr, (
'ERROR: no upstream branch')
@@ -1705,10 +1705,10 @@
cl = Changelist(auth_config=auth_config)
print
print 'Current branch:',
- if not cl.GetIssue():
- print 'no issue assigned.'
- return 0
print cl.GetBranch()
+ if not cl.GetIssue():
+ print 'No issue assigned.'
+ return 0
print 'Issue number: %s (%s)' % (cl.GetIssue(), cl.GetIssueURL())
if not options.fast:
print 'Issue description:'