提交 2fe18392 编写于 作者: J Junio C Hamano

Merge branch 'maint'

* maint:
  Documentation: fix graph in git-rev-parse.txt
  show-branch --current: do not barf on detached HEAD
......@@ -243,16 +243,18 @@ Here is an illustration, by Jon Loeliger. Both commit nodes B
and C are parents of commit node A. Parent commits are ordered
left-to-right.
G H I J
\ / \ /
D E F
\ | / \
\ | / |
\|/ |
B C
\ /
\ /
A
........................................
G H I J
\ / \ /
D E F
\ | / \
\ | / |
\|/ |
B C
\ /
\ /
A
........................................
A = = A^0
B = A^ = A^1 = A~1
......
......@@ -782,8 +782,8 @@ int cmd_show_branch(int ac, const char **av, const char *prefix)
has_head++;
}
if (!has_head) {
int pfxlen = strlen("refs/heads/");
append_one_rev(head + pfxlen);
int offset = !prefixcmp(head, "refs/heads/") ? 11 : 0;
append_one_rev(head + offset);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册