fix typo in git-am manpage
[gitweb.git] / builtin-show-branch.c
index fa62e487b186adc72ac41aacca31b4f4c8baefa9..0d94e40df893ee6ecf146e8987c0696cb4874a36 100644 (file)
@@ -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;