diff options
author | Malfurious <m@lfurio.us> | 2024-03-11 23:46:04 -0400 |
---|---|---|
committer | Malfurious <m@lfurio.us> | 2024-03-11 23:46:04 -0400 |
commit | 505e52aa3dd44b94a878c7a7e906263535e1df56 (patch) | |
tree | 8ea68ef1bae6f06c86f7bf619e23b68d3e1a2864 | |
parent | e520832bc0aadb964b703bf7f087feab80ca78ab (diff) | |
download | srcnode-505e52aa3dd44b94a878c7a7e906263535e1df56.tar.gz srcnode-505e52aa3dd44b94a878c7a7e906263535e1df56.zip |
gitolite: Force blank description for newly created repositories
A gitolite POST_CREATE trigger is added to initialize the description
file in new repos. This prevents the "Unnamed repository; edit this
file ..." string from being used by default.
This affects new repositories, existing projects will remain as is.
Signed-off-by: Malfurious <m@lfurio.us>
-rw-r--r-- | gitolite/dotfiles/.gitolite.rc | 4 | ||||
-rwxr-xr-x | gitolite/dotfiles/local/triggers/create | 6 |
2 files changed, 10 insertions, 0 deletions
diff --git a/gitolite/dotfiles/.gitolite.rc b/gitolite/dotfiles/.gitolite.rc index bd661de..00227c2 100644 --- a/gitolite/dotfiles/.gitolite.rc +++ b/gitolite/dotfiles/.gitolite.rc @@ -89,6 +89,10 @@ 'push', ], + POST_CREATE => [ + 'create', + ], + ENABLE => [ # COMMANDS diff --git a/gitolite/dotfiles/local/triggers/create b/gitolite/dotfiles/local/triggers/create new file mode 100755 index 0000000..da8f560 --- /dev/null +++ b/gitolite/dotfiles/local/triggers/create @@ -0,0 +1,6 @@ +#!/bin/sh + +[ "$4" = "W" ] || exit 0 + +cd "$GL_REPO_BASE/$2.git" +echo "" >description |