diff options
author | Alan Pearce | 2024-04-11 00:04:06 +0200 |
---|---|---|
committer | Alan Pearce | 2024-04-11 00:04:06 +0200 |
commit | 6c18a33c758f0226e660f924ddd71a6d3ad53004 (patch) | |
tree | 946b87a7e268604a47217e5e3250e144b4eaf3f0 /patches | |
parent | 2b09b74ba617346a0c9c932543e658837ef9e5d2 (diff) | |
download | nixfiles-6c18a33c758f0226e660f924ddd71a6d3ad53004.tar.lz nixfiles-6c18a33c758f0226e660f924ddd71a6d3ad53004.tar.zst nixfiles-6c18a33c758f0226e660f924ddd71a6d3ad53004.zip |
Import server configurations
Diffstat (limited to 'patches')
-rw-r--r-- | patches/cgit-pink.patch | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/patches/cgit-pink.patch b/patches/cgit-pink.patch new file mode 100644 index 00000000..0e91525e --- /dev/null +++ b/patches/cgit-pink.patch @@ -0,0 +1,26 @@ +diff --git a/cgit.c b/cgit.c +index dd28a79..451f518 100644 +--- a/cgit.c ++++ b/cgit.c +@@ -489,7 +489,7 @@ static char *guess_defbranch(void) + + ref = resolve_ref_unsafe("HEAD", 0, &oid, NULL); + if (!ref || !skip_prefix(ref, "refs/heads/", &refname)) +- return "master"; ++ return "main"; + return xstrdup(refname); + } + +diff --git a/ui-repolist.c b/ui-repolist.c +index 97b11c5..cde9cd0 100644 +--- a/ui-repolist.c ++++ b/ui-repolist.c +@@ -53,7 +53,7 @@ static int get_repo_modtime(const struct cgit_repo *repo, time_t *mtime) + + strbuf_reset(&path); + strbuf_addf(&path, "%s/refs/heads/%s", repo->path, +- repo->defbranch ? repo->defbranch : "master"); ++ repo->defbranch ? repo->defbranch : "main"); + if (stat(path.buf, &s) == 0) { + *mtime = s.st_mtime; + r->mtime = *mtime; |