mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
build: Add a commit-msg hook that embeds Change-Id in commit messages.
Partially implements <https://issues.guix.gnu.org/66027>. This will make it possible to track a merged commit back to its original posting on the mailing list, and open the door to new opportunities such as closing fully merged series automatically. * Makefile.am (COMMIT_MSG_MAGIC): New variable. (.git/hooks/commit-msg): New target. * etc/git/commit-msg: New file. * doc/contributing.texi (Configuring Git): Document Change-Id. Series-changes: 3 - Clarify documentation text, as suggested by Simon Change-Id: Ia92fa958eae600fdd4e180bad494c85db8bb4dd6 Reviewed-by: Simon Tournier <zimon.toutoune@gmail.com>
This commit is contained in:
parent
faeebdc37e
commit
8005e09b26
3 changed files with 114 additions and 2 deletions
12
Makefile.am
12
Makefile.am
|
@ -1170,7 +1170,17 @@ cuirass-jobs: $(GOBJECTS)
|
|||
git config --add include.path ../etc/git/gitconfig; \
|
||||
fi
|
||||
|
||||
nodist_noinst_DATA = .git/hooks/pre-push .git/config
|
||||
COMMIT_MSG_MAGIC = VGhpcyBpcyB0aGUgY29tbWl0LW1zZyBob29rIG9mIEd1aXg=
|
||||
.git/hooks/commit-msg: etc/git/commit-msg
|
||||
$(AM_V_at)if test -d .git; then \
|
||||
if test -f $@ && ! grep -qF $(COMMIT_MSG_MAGIC) $@; then \
|
||||
mkdir -p $@.d && mv $@ $@.d && \
|
||||
@ echo user commit-msg hook moved to $@.d/commit-msg; \
|
||||
fi; \
|
||||
cp etc/git/commit-msg $@; \
|
||||
fi
|
||||
|
||||
nodist_noinst_DATA = .git/hooks/pre-push .git/config .git/hooks/commit-msg
|
||||
|
||||
# Downloading up-to-date PO files.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue