When branch is not correctly set, it would throw an exception.

Review URL: http://codereview.chromium.org/2087015

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@47678 0039d316-1c4b-4281-b951-d872f2087c98
experimental/szager/collated-output
maruel@chromium.org 15 years ago
parent 400f3e7090
commit 4d9da40423

@ -574,6 +574,8 @@ class GitWrapper(SCMWrapper):
# Returns name of current branch
# Returns None if inside a (no branch)
tokens = self._Run(['branch']).split()
if not '*' in tokens:
return None
branch = tokens[tokens.index('*') + 1]
if branch == '(no':
return None

Loading…
Cancel
Save