Do not rely on unlocalized/hardcoded string for detecting detached HEAD on branch...
commit2fcda38dc4e19fb2f3c144645431f4aa3b971a54
authorSven Strickroth <email@cs-ware.de>
Fri, 24 Jul 2015 00:59:25 +0000 (24 02:59 +0200)
committerSven Strickroth <email@cs-ware.de>
Fri, 24 Jul 2015 00:59:25 +0000 (24 02:59 +0200)
treec534b412d0a681305c0ab717eb9f10865329dd7f
parent8a32f495d4355add1abd21ac388d0a56303c88d2
Do not rely on unlocalized/hardcoded string for detecting detached HEAD on branch list

E.g. "git branch" using Git for Windows 2.4.5 on a German system shows:
  * (HEAD losgelöst bei 5a40e87)
    control-ref-prune-setting
    crlf
    development

Older git versions reported a name starting with "(no branch" or "(detached from ".

Also, branches starting with "(" are valid. Thus, we cannot use a starting "(" as a heuristic for detached HEAD and have to check more carefully.

Signed-off-by: Sven Strickroth <email@cs-ware.de>
src/Git/Git.cpp
test/UnitTests/GitTest.cpp