summaryrefslogtreecommitdiff
path: root/cgit.c
diff options
context:
space:
mode:
authorElis Eriksson <spelis.tech@gmail.com>2026-06-22 00:32:34 +0200
committerElis Eriksson <spelis.tech@gmail.com>2026-06-22 00:32:34 +0200
commitd1375449de5501fd2f65146e5a524eaa2d3f28a6 (patch)
tree85ef4d86b6af007cfd57da3c9d7b6f047af71742 /cgit.c
parent5409b229444bb1ea7a1ec99a5e08e091d702e7d9 (diff)
downloadcgit-d1375449de5501fd2f65146e5a524eaa2d3f28a6.tar
cgit-d1375449de5501fd2f65146e5a524eaa2d3f28a6.tar.gz
cgit-d1375449de5501fd2f65146e5a524eaa2d3f28a6.tar.bz2
cgit-d1375449de5501fd2f65146e5a524eaa2d3f28a6.tar.lz
cgit-d1375449de5501fd2f65146e5a524eaa2d3f28a6.tar.xz
cgit-d1375449de5501fd2f65146e5a524eaa2d3f28a6.tar.zst
cgit-d1375449de5501fd2f65146e5a524eaa2d3f28a6.zip
please cgit im desperate
Diffstat (limited to 'cgit.c')
-rw-r--r--cgit.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/cgit.c b/cgit.c
index 430c79b..a9ce663 100644
--- a/cgit.c
+++ b/cgit.c
@@ -501,8 +501,8 @@ static char *guess_defbranch(void)
ref = refs_resolve_ref_unsafe(get_main_ref_store(the_repository),
"HEAD", 0, &oid, NULL);
- if (!ref || !skip_prefix(ref, "refs/heads/", &refname))
- return "master";
+ if (!ref || !skip_prefix(ref, "ref: refs/heads/", &refname))
+ return "main";
return xstrdup(refname);
}