Add new test to ensure git-merge handles more than 25 refs.
[gitweb.git] / builtin-show-branch.c
index ee4269dd33aa0b2229eaac0ce7b75f7893447b0f..93047f5117796fb7556fa23871397e68e9f5e4c2 100644 (file)
@@ -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);
                }
        }