Commit ee87f587 authored by dpranke@chromium.org's avatar dpranke@chromium.org

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
parent faa4dfc1
......@@ -795,7 +795,7 @@ or verify this branch is set up to track another (via the --track argument to
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 @@ def CMDstatus(parser, args):
cl = Changelist(auth_config=auth_config)
print
print 'Current branch:',
print cl.GetBranch()
if not cl.GetIssue():
print 'no issue assigned.'
print 'No issue assigned.'
return 0
print cl.GetBranch()
print 'Issue number: %s (%s)' % (cl.GetIssue(), cl.GetIssueURL())
if not options.fast:
print 'Issue description:'
......
......@@ -26,7 +26,7 @@ setup_gitsvn
git config rietveld.server localhost:10000
test_expect_success "git-cl status has no issue" \
"$GIT_CL_STATUS | grep -q 'no issue'"
"$GIT_CL_STATUS | grep -q 'No issue assigned'"
# Prevent the editor from coming up when you upload.
export GIT_EDITOR=$(which true)
......
......@@ -25,8 +25,9 @@ setup_gitgit
git config rietveld.server localhost:10000
# echo $($GIT_CL_STATUS)
test_expect_success "git-cl status has no issue" \
"$GIT_CL_STATUS | grep -q 'no issue'"
"$GIT_CL_STATUS | grep -q 'No issue assigned'"
# Prevent the editor from coming up when you upload.
export GIT_EDITOR=$(which true)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment