Bug 273574 - Committer's Guide: Change the way to install commit message template hook
Summary: Committer's Guide: Change the way to install commit message template hook
Status: Closed FIXED
Alias: None
Product: Documentation
Classification: Unclassified
Component: Books & Articles (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Sergio Carlavilla Delgado
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-09-05 04:12 UTC by Yasuhiro Kimura
Modified: 2023-09-07 18:30 UTC (History)
2 users (show)

See Also:


Attachments
Patch file (2.16 KB, patch)
2023-09-05 04:12 UTC, Yasuhiro Kimura
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yasuhiro Kimura freebsd_committer freebsd_triage 2023-09-05 04:12:36 UTC
Created attachment 244648 [details]
Patch file

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.
Comment 1 commit-hook freebsd_committer freebsd_triage 2023-09-07 18:29:51 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/doc/commit/?id=2c37efcbbbe845eab97517b90d099a22bc32c67c

commit 2c37efcbbbe845eab97517b90d099a22bc32c67c
Author:     Yasuhiro Kimura <yasu@freebsd.org>
AuthorDate: 2023-09-07 18:27:39 +0000
Commit:     Sergio Carlavilla Delgado <carlavilla@FreeBSD.org>
CommitDate: 2023-09-07 18:27:39 +0000

    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

 .../en/articles/committers-guide/_index.adoc        | 21 +++++++++++++++++++--
 1 file changed, 19 insertions(+), 2 deletions(-)
Comment 2 Sergio Carlavilla Delgado freebsd_committer freebsd_triage 2023-09-07 18:30:37 UTC
Done, thanks for the patch.
I added all the explanation to the commit.