Hi, > > builtin-show-branch.c | 3 +-- > > 1 files changed, 1 insertions(+), 2 deletions(-) > > > > diff --git a/builtin-show-branch.c b/builtin-show-branch.c > > index 019abd3..412eba0 100644 > > --- a/builtin-show-branch.c > > +++ b/builtin-show-branch.c > > @@ -782,8 +782,7 @@ 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); > > + append_one_rev(head); > > This changes the output for normal case. It does? How? I cite my commit message: > [...] So append_one_rev() operates > on "refs/heads/foo" instead of "foo", which still works. > But now it also operates correctly on "HEAD". And I still think it's true. I diff'ed the outputs of git-show-branch --current AND (just to go sure) git-show-branch on git.next before and after the patch: No difference. > + int offset = !prefixcmp(head, "refs/heads/") ? 11 : 0; Your version is the intuitive change and, of course, right, but I don't see why we should do the prefixcmp() when it does not change the resulting behavior in any way. Regards, Stephan -- Stephan Beyer <s-beyer@xxxxxxx>, PGP 0x6EDDD207FCC5040F
Attachment:
signature.asc
Description: Digital signature