aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYasuhiro Kimura <yasu@freebsd.org>2023-09-07 18:27:39 +0000
committerSergio Carlavilla Delgado <carlavilla@FreeBSD.org>2023-09-07 18:27:39 +0000
commit2c37efcbbbe845eab97517b90d099a22bc32c67c (patch)
tree05ad249eef85b4f1c8c889294d8f4ed591adc327
parent5ffcb5c257b63b96356f85b9f93d4623f4f11757 (diff)
downloaddoc-2c37efcbbb.tar.gz
doc-2c37efcbbb.zip
Committer's: Change the way to install commit template hook
Currently commit message template hook is installed as following. * The one for src repository is also used for doc and ports. * The file is downloaded through web interface (https://cgit.freebsd.org/) and installed under .git/hooks. However, * Both doc and ports repositories have their own hooks inside them. So it is obviously better to use them than using the one for src repository. * For src repository committer need to download and install hook file each time it is updated. So change the way to install commit message template hook as following. * For doc and src repository, create symbolic link under '.git/hooks' that points to real hook file. * For ports repository. set the path to look for hooks to '.hooks'. This is because ports repository also provides some other hooks and creating symbolic link for each of them is bothersome. PR: 273574
-rw-r--r--documentation/content/en/articles/committers-guide/_index.adoc21
1 files changed, 19 insertions, 2 deletions
diff --git a/documentation/content/en/articles/committers-guide/_index.adoc b/documentation/content/en/articles/committers-guide/_index.adoc
index dfdd674457..667e635bd2 100644
--- a/documentation/content/en/articles/committers-guide/_index.adoc
+++ b/documentation/content/en/articles/committers-guide/_index.adoc
@@ -391,10 +391,27 @@ Again, note that `gitrepo.freebsd.org` has been canonicalized to `repo.freebsd.o
* Install commit message template hook:
+
+For doc repository:
++
+[source,shell]
+....
+% cd .git/hooks
+% ln -s ../../.hooks/prepare-commit-msg
+....
++
+For ports repository:
++
+[source,shell]
+....
+% git config --add core.hooksPath .hooks
+....
++
+For src repository:
++
[source,shell]
....
-% fetch https://cgit.freebsd.org/src/plain/tools/tools/git/hooks/prepare-commit-msg -o .git/hooks
-% chmod 755 .git/hooks/prepare-commit-msg
+% cd .git/hooks
+% ln -s ../../tools/tools/git/hooks/prepare-commit-msg
....
[[admin-branch]]