aboutsummaryrefslogtreecommitdiffstats
path: root/cgit.c
diff options
context:
space:
mode:
Diffstat (limited to 'cgit.c')
-rw-r--r--cgit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cgit.c b/cgit.c
index 972a67e..a3702c2 100644
--- a/cgit.c
+++ b/cgit.c
@@ -478,7 +478,7 @@ static char *guess_defbranch(void)
478 const char *ref, *refname; 478 const char *ref, *refname;
479 struct object_id oid; 479 struct object_id oid;
480 480
481 ref = resolve_ref_unsafe("HEAD", 0, oid.hash, NULL); 481 ref = resolve_ref_unsafe("HEAD", 0, &oid, NULL);
482 if (!ref || !skip_prefix(ref, "refs/heads/", &refname)) 482 if (!ref || !skip_prefix(ref, "refs/heads/", &refname))
483 return "master"; 483 return "master";
484 return xstrdup(refname); 484 return xstrdup(refname);