From: Junio C Hamano Date: Mon, 26 May 2008 22:09:51 +0000 (-0700) Subject: show-branch --current: do not barf on detached HEAD X-Git-Tag: v1.5.5.3~7 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/f8fcb57bb45e8d3d8f7921377d6c2503590efc3c?hp=f8fcb57bb45e8d3d8f7921377d6c2503590efc3c show-branch --current: do not barf on detached HEAD The code assumed that there always is the current branch, but the result from resolve_ref() on detached HEAD does not even start with "refs/heads/". Originally noticed and fixed by Stephan Beyer. Signed-off-by: Junio C Hamano ---