diff --git a/builtin-show-branch.c b/builtin-show-branch.c
index 5d6ce568360629f3844513b81f97e4412002b88b..fb1a4000d98e27389904578309b935cbda2a85fe 100644 (file)
--- a/builtin-show-branch.c
+++ b/builtin-show-branch.c
if ((!head[0]) ||
(head_sha1 && sha1 && hashcmp(head_sha1, sha1)))
return 0;
+ if (!strncmp(head, "refs/heads/", 11))
+ head += 11;
+ if (!strncmp(name, "refs/heads/", 11))
+ name += 11;
+ else if (!strncmp(name, "heads/", 6))
+ name += 6;
return !strcmp(head, name);
}