diff options
author | Alan Pearce | 2024-04-28 23:21:11 +0200 |
---|---|---|
committer | Alan Pearce | 2024-04-29 20:57:07 +0200 |
commit | 75a4e09f1d241f7882a86d7f9c4aa1804a981209 (patch) | |
tree | f56e407f99f9bbf696dd229e79f56d3664461a15 /overlays/cgit-pink | |
parent | 21398bece441d9afaa8e74539d993c3e976ebce0 (diff) | |
download | nixfiles-75a4e09f1d241f7882a86d7f9c4aa1804a981209.tar.lz nixfiles-75a4e09f1d241f7882a86d7f9c4aa1804a981209.tar.zst nixfiles-75a4e09f1d241f7882a86d7f9c4aa1804a981209.zip |
move overlays to root folder
Diffstat (limited to 'overlays/cgit-pink')
-rw-r--r-- | overlays/cgit-pink/default.nix | 5 | ||||
-rw-r--r-- | overlays/cgit-pink/set-default-branch-main.patch | 26 |
2 files changed, 31 insertions, 0 deletions
diff --git a/overlays/cgit-pink/default.nix b/overlays/cgit-pink/default.nix new file mode 100644 index 00000000..ba62b718 --- /dev/null +++ b/overlays/cgit-pink/default.nix @@ -0,0 +1,5 @@ +self: super: { + cgit-pink = super.cgit-pink.overrideAttrs (old: { + patches = [ ./cgit-pink.patch ]; + }); +} diff --git a/overlays/cgit-pink/set-default-branch-main.patch b/overlays/cgit-pink/set-default-branch-main.patch new file mode 100644 index 00000000..0e91525e --- /dev/null +++ b/overlays/cgit-pink/set-default-branch-main.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; |