summaryrefslogtreecommitdiffstats
path: root/docker
diff options
context:
space:
mode:
authorMalfurious <m@lfurio.us>2022-08-18 09:40:16 -0400
committerMalfurious <m@lfurio.us>2022-08-18 09:40:16 -0400
commit18e9a5efbf13f0886b259e8f17c6d646a52cfb10 (patch)
tree72691cc1bcdecb70a6cc88e1417a39b4275591a6 /docker
parent63383dd83ac4f5dfada4ffd716f6ffcdb852638d (diff)
downloadsrcnode-18e9a5efbf13f0886b259e8f17c6d646a52cfb10.tar.gz
srcnode-18e9a5efbf13f0886b259e8f17c6d646a52cfb10.zip
gitolite: Set default branch on first push
The non-core feature 'symbolic-ref' that ships with gitolite opens a bigger hole than I would intend to (in the form of allowing arbitrary git-symbolic-ref commands to be executed). As an alternative, a post-git gitolite trigger is added. Its only purpose at the moment is to check on the state of HEAD following any pushes. Under normal circumstances, HEAD will point to a valid branch, or on a first push, the master branch will be provided, validating HEAD. If after the first push, there is no branch called master, we assume the creator wishes to use another name for the default branch, and so will update the ref if doing so is unambiguous (there is only one other branch). If multiple non-master branches are present in this case, a warning is issued, and HEAD is left invalid, awaiting a later push to master. This _should_ only be an issue for the first push. Once HEAD refers to a valid branch (of any name), this action is bypassed going forward. Signed-off-by: Malfurious <m@lfurio.us>
Diffstat (limited to 'docker')
0 files changed, 0 insertions, 0 deletions