diff options
author | Malfurious <m@lfurio.us> | 2023-09-13 04:18:16 -0400 |
---|---|---|
committer | Malfurious <m@lfurio.us> | 2023-09-15 10:53:24 -0400 |
commit | c3e4b42c98dd433bbc2f90beeae102a4993c17e5 (patch) | |
tree | 1c75e73de075f3a1e791f053a2e5ddc877da07eb /gitolite/dotfiles/local/triggers/push | |
parent | 5cd2822ed607d1f20d1d114aebe511a4fe5f1825 (diff) | |
download | srcnode-c3e4b42c98dd433bbc2f90beeae102a4993c17e5.tar.gz srcnode-c3e4b42c98dd433bbc2f90beeae102a4993c17e5.zip |
gitolite: Consolidate config files into a single directory
The repository is being reworked to decouple its roles as normalmode
source and gitolite-admin config. The gitolite-admin repository will be
entirely separate. So there is no need to keep the conf or local
directories around where they are at.
Signed-off-by: Malfurious <m@lfurio.us>
Diffstat (limited to 'gitolite/dotfiles/local/triggers/push')
-rwxr-xr-x | gitolite/dotfiles/local/triggers/push | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gitolite/dotfiles/local/triggers/push b/gitolite/dotfiles/local/triggers/push new file mode 100755 index 0000000..7a3cb56 --- /dev/null +++ b/gitolite/dotfiles/local/triggers/push @@ -0,0 +1,18 @@ +#!/bin/sh + +[ "$4" = "W" ] || exit 0 + +cd "$GL_REPO_BASE/$2.git" +head=$(git symbolic-ref HEAD) + +if ! [ -f "$head" ]; then + set -- refs/heads/* + if [ "$#" -eq 1 ]; then + git symbolic-ref HEAD "$1" + echo "NOTICE: Default branch set to $1" >&2 + else + echo "WARNING: The default branch is $head, but no such branch exists" >&2 + fi +fi + +git log -1 --all --date-order --format=%ci >agefile |