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: NJunio C Hamano <gitster@pobox.com>
Showing
想要评论请 注册 或 登录