diff options
author | Junio C Hamano <gitster@pobox.com> | 2008-05-26 19:49:01 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-05-26 19:49:01 -0700 |
commit | 2fe18392f0355c80295b8b74b24fc817183d3752 (patch) | |
tree | 46feb2f65ad4589475ff946bb34b8abd4a5a928d | |
parent | 2d3cfd77ad5305c132f7b23c192ae6c327443c95 (diff) | |
parent | 109440c1bf2a3015cd9253515f07231c4cf9d65a (diff) | |
download | git-2fe18392f0355c80295b8b74b24fc817183d3752.tar.gz |
Merge branch 'maint'
* maint:
Documentation: fix graph in git-rev-parse.txt
show-branch --current: do not barf on detached HEAD
-rw-r--r-- | Documentation/git-rev-parse.txt | 22 | ||||
-rw-r--r-- | builtin-show-branch.c | 4 |
2 files changed, 14 insertions, 12 deletions
diff --git a/Documentation/git-rev-parse.txt b/Documentation/git-rev-parse.txt index 69599ffb67..5641d99518 100644 --- a/Documentation/git-rev-parse.txt +++ b/Documentation/git-rev-parse.txt @@ -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 diff --git a/builtin-show-branch.c b/builtin-show-branch.c index ee4269dd33..93047f5117 100644 --- a/builtin-show-branch.c +++ b/builtin-show-branch.c @@ -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); } } |