Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
git-format-patch(1): fix stray \ in output
[gitweb.git]
/
builtin-show-branch.c
diff --git
a/builtin-show-branch.c
b/builtin-show-branch.c
index ee4269dd33aa0b2229eaac0ce7b75f7893447b0f..93047f5117796fb7556fa23871397e68e9f5e4c2 100644
(file)
--- 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
);
}
}