aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKylie McClain <kylie@somas.is>2021-06-28 14:50:26 -0400
committerKylie McClain <kylie@somas.is>2021-06-28 14:51:39 -0400
commita1ab357e580c00bc1046024d1461bfa5355ff752 (patch)
tree106f1a47b3137eeafff6c9e0296a3a3674ece468
parent5d66f5c55480c4adeb543756332deddfedd916c5 (diff)
downloadgitolite-admin-a1ab357e580c00bc1046024d1461bfa5355ff752.tar.gz
gitolite-admin-a1ab357e580c00bc1046024d1461bfa5355ff752.tar.xz
gitolite-admin-a1ab357e580c00bc1046024d1461bfa5355ff752.zip
Remove fix_default_branch, which seems to be causing issues
-rw-r--r--README.adoc34
-rwxr-xr-xlocal/triggers/POST_GIT/fix_default_branch.sh19
2 files changed, 14 insertions, 39 deletions
diff --git a/README.adoc b/README.adoc
index 5dad417..ade7527 100644
--- a/README.adoc
+++ b/README.adoc
@@ -9,26 +9,20 @@ manages access controls, git-daemon, and SSH-accessible git repositories.
----
local
-├── hooks
-│ └── repo-specific - All hooks are controlled by the 'repo-specific-hooks' plugin
-│ │ on gitolite, because that simplifies mixing and matching hooks
-│ │ as needed.
-│ ├── cgit-agefile - cgit can use an "agefile" to track the idle time of a
-│ │ repository more accurately. This simply touches that file when
-│ │ a push to a repository is received.
-│ ├── deploy-laminar-config - This hook is used for the laminar-admin repository, to copy
-│ │ the configuration files to the right place on the server.
-│ ├── irccat - This hook is used to output commits to IRC channels.
-│ └── push-to-mirror - This hook is used to push to mirror of local repositories.
-│ Some repositories on git.mutiny.red are mirrored to GitHub,
-│ namely all the mutiny/* repositories and a few of my (somasis)
-│ personal repositories.
-└── triggers
- └── POST_GIT
- └── fix_default_branch.sh - When possible, I use "main" for all my git repositories.
- Gitolite doesn't correctly set the symbolic-ref for HEAD when
- a repository is pushed to for the first time though, and so
- if left unfixed, it won't be cloned properly. This fixes that.
+└── hooks
+ └── repo-specific - All hooks are controlled by the 'repo-specific-hooks' plugin
+ │ on gitolite, because that simplifies mixing and matching hooks
+ │ as needed.
+ ├── cgit-agefile - cgit can use an "agefile" to track the idle time of a
+ │ repository more accurately. This simply touches that file when
+ │ a push to a repository is received.
+ ├── deploy-laminar-config - This hook is used for the laminar-admin repository, to copy
+ │ the configuration files to the right place on the server.
+ ├── irccat - This hook is used to output commits to IRC channels.
+ └── push-to-mirror - This hook is used to push to mirror of local repositories.
+ Some repositories on git.mutiny.red are mirrored to GitHub,
+ namely all the mutiny/* repositories and a few of my (somasis)
+ personal repositories.
----
== cgit
diff --git a/local/triggers/POST_GIT/fix_default_branch.sh b/local/triggers/POST_GIT/fix_default_branch.sh
deleted file mode 100755
index 1973773..0000000
--- a/local/triggers/POST_GIT/fix_default_branch.sh
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/sh
-
-case "${2}" in
- */forks*) exit 0 ;;
-esac
-
-cd /srv/git/repositories/"$2".git
-branch_count=$(git branch | wc -l)
-
-[ "${branch_count}" -eq 1 ] || exit
-git for-each-ref --format='%(refname:short)' refs/heads/ | sort -d | while read -r branch; do
- case "${branch}" in
- main|master) : ;;
- *) continue ;;
- esac
-
- git symbolic-ref HEAD refs/heads/"${branch}"
-done
-