提交 ef08c149 编写于 作者: A Alexandre Julliard 提交者: Junio C Hamano

git.el: Avoid a lisp error when there's no current branch (detached HEAD).

Signed-off-by: NAlexandre Julliard <julliard@winehq.org>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 2f5b3980
......@@ -664,9 +664,11 @@ Return the list of files that haven't been handled."
(ewoc-set-hf status
(format "Directory: %s\nBranch: %s\nHead: %s%s\n"
default-directory
(if (string-match "^refs/heads/" branch)
(substring branch (match-end 0))
branch)
(if branch
(if (string-match "^refs/heads/" branch)
(substring branch (match-end 0))
branch)
"none (detached HEAD)")
head
(if merge-heads
(concat "\nMerging: "
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册