summaryrefslogtreecommitdiffstats
path: root/debian/patches/progress-linux
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 14:18:23 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 14:18:23 +0000
commit89e9af2ea4b33450164fd12edf36c94befbdc808 (patch)
treefe1743383d3fbf820c02f9dfae64301dbb91fb45 /debian/patches/progress-linux
parentUpdating check of existing .gitolite.rc to work with symlinks too (Closes: #8... (diff)
downloadgitolite3-89e9af2ea4b33450164fd12edf36c94befbdc808.tar.xz
gitolite3-89e9af2ea4b33450164fd12edf36c94befbdc808.zip
Using main as default branch in gitolite-admin.git hooks.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/patches/progress-linux')
-rw-r--r--debian/patches/progress-linux/0001-default-branch.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/debian/patches/progress-linux/0001-default-branch.patch b/debian/patches/progress-linux/0001-default-branch.patch
new file mode 100644
index 0000000..4dcf393
--- /dev/null
+++ b/debian/patches/progress-linux/0001-default-branch.patch
@@ -0,0 +1,34 @@
+Author: Daniel Baumann <daniel.baumann@progress-linux.org>
+Description: Using main as default branch in gitolite-admin.git hooks.
+
+diff -Naurp gitolite3.orig/src/lib/Gitolite/Hooks/PostUpdate.pm gitolite3/src/lib/Gitolite/Hooks/PostUpdate.pm
+--- gitolite3.orig/src/lib/Gitolite/Hooks/PostUpdate.pm
++++ gitolite3/src/lib/Gitolite/Hooks/PostUpdate.pm
+@@ -20,23 +20,23 @@ use warnings;
+
+ sub post_update {
+ trace( 3, 'post-up', @ARGV );
+- exit 0 unless grep( m(^refs/heads/master$), @ARGV );
++ exit 0 unless grep( m(^refs/heads/main$), @ARGV );
+ # this is the *real* post_update hook for gitolite
+
+- tsh_try("git ls-tree --name-only master");
++ tsh_try("git ls-tree --name-only main");
+ _die "no files/dirs called 'hooks' or 'logs' are allowed" if tsh_text() =~ /^(hooks|logs)$/m;
+
+ my $hooks_changed = 0;
+ {
+ local $ENV{GIT_WORK_TREE} = $rc{GL_ADMIN_BASE};
+
+- tsh_try("git diff --name-only master");
++ tsh_try("git diff --name-only main");
+ $hooks_changed++ if tsh_text() =~ m(/hooks/common/);
+ # the leading slash ensure that this hooks/common directory is below
+ # some top level directory, not *at* the top. That's LOCAL_CODE, and
+ # it's actual name could be anything but it doesn't matter to us.
+
+- tsh_try("git checkout -f --quiet master");
++ tsh_try("git checkout -f --quiet main");
+ }
+ _system("gitolite compile");
+ _system("gitolite setup --hooks-only") if $hooks_changed;