X-Git-Url: https://gitweb.ps.run/ps-cgit/blobdiff_plain/c1cd290d1f83d3d1c2d081d734e8d213f12cc06b..6b5b655f6d2449fe33d8f48f6e98d5e421bf3ff9:/cgit.c 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) const char *ref, *refname; struct object_id oid; - ref = resolve_ref_unsafe("HEAD", 0, oid.hash, NULL); + ref = resolve_ref_unsafe("HEAD", 0, &oid, NULL); if (!ref || !skip_prefix(ref, "refs/heads/", &refname)) return "master"; return xstrdup(refname);