From: Shawn O. Pearce Date: Thu, 5 Jul 2007 23:19:37 +0000 (-0400) Subject: git-gui: Better handling of detached HEAD X-Git-Tag: v1.5.3-rc1~16^2~21 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/311e02a4a5c7b82c996214f06d58e2b51b3ecc22?ds=inline;hp=311e02a4a5c7b82c996214f06d58e2b51b3ecc22 git-gui: Better handling of detached HEAD If the current branch is not a symbolic-ref that points to a name in the refs/heads/ namespace we now just assume that the head is a detached head. In this case we return the special branch name of HEAD rather than empty string, as HEAD is a valid revision specification and the empty string is not. I have also slightly improved the current-branch function by using string functions to parse the symbolic-ref data. This should be slightly faster than using a regsub. I think the code is clearer too. Signed-off-by: Shawn O. Pearce ---