Fix git branch parsing.
In git version 2.4 the git branch command prints "* (HEAD detached at"
or "* (HEAD detached from" instead of "* (detached from". Adjust the parsing to make our tests
still work with git 2.4.
BUG=487172
Review URL: https://codereview.chromium.org/1162763003
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295578 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/git_common.py b/git_common.py
index 6b21050..a01f8e5 100644
--- a/git_common.py
+++ b/git_common.py
@@ -293,7 +293,7 @@
def branches(*args):
- NO_BRANCH = ('* (no branch', '* (detached from ')
+ NO_BRANCH = ('* (no branch', '* (detached', '* (HEAD detached')
key = 'depot-tools.branch-limit'
limit = 20