git.el: Avoid a lisp error when there's no current branch (detached HEAD).
Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
2f5b398061
commit
ef08c14993
@ -664,9 +664,11 @@ Return the list of files that haven't been handled."
|
|||||||
(ewoc-set-hf status
|
(ewoc-set-hf status
|
||||||
(format "Directory: %s\nBranch: %s\nHead: %s%s\n"
|
(format "Directory: %s\nBranch: %s\nHead: %s%s\n"
|
||||||
default-directory
|
default-directory
|
||||||
(if (string-match "^refs/heads/" branch)
|
(if branch
|
||||||
(substring branch (match-end 0))
|
(if (string-match "^refs/heads/" branch)
|
||||||
branch)
|
(substring branch (match-end 0))
|
||||||
|
branch)
|
||||||
|
"none (detached HEAD)")
|
||||||
head
|
head
|
||||||
(if merge-heads
|
(if merge-heads
|
||||||
(concat "\nMerging: "
|
(concat "\nMerging: "
|
||||||
|
Loading…
Reference in New Issue
Block a user