diff options
Diffstat (limited to 'builtin-show-branch.c')
-rw-r--r-- | builtin-show-branch.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/builtin-show-branch.c b/builtin-show-branch.c index fa62e487b1..0d94e40df8 100644 --- a/builtin-show-branch.c +++ b/builtin-show-branch.c @@ -690,7 +690,10 @@ int cmd_show_branch(int ac, const char **av, const char *prefix) if (ac == 0) { static const char *fake_av[2]; - fake_av[0] = "HEAD"; + const char *refname; + + refname = resolve_ref("HEAD", sha1, 1, NULL); + fake_av[0] = xstrdup(refname); fake_av[1] = NULL; av = fake_av; ac = 1; |