1
Fork 0
mirror of https://https.git.savannah.gnu.org/git/guix.git/ synced 2025-07-10 16:50:43 +02:00

build: Create .git/hooks/.

* Makefile.am (.git/hooks/): Add.
(.git/hooks/%, .git/hooks/commit-msg): Depend on .git/hooks/.

Change-Id: I5e027d22ec71b8cb080dca2971fabb85c593cb35
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
Brice Waegeneire 2025-06-22 12:28:48 +02:00 committed by Ludovic Courtès
parent aa2f243ab7
commit c6b4fe16f4
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -20,6 +20,7 @@
# Copyright © 2023 Clément Lassieur <clement@lassieur.org>
# Copyright © 2023, 2024 Wilko Meyer <w@wmeyer.eu>
# Copyright © 2024 gemmaro <gemmaro.dev@gmail.com>
# Copyright © 2025 Brice Waegeneire <brice@waegenei.re>
#
# This file is part of GNU Guix.
#
@ -1248,7 +1249,12 @@ cuirass-jobs: $(GOBJECTS)
.PHONY: update-guix-package update-NEWS cuirass-jobs release
# Git auto-configuration.
.git/hooks/%: etc/git/%
.git/hooks/:
$(AM_V_at)if test -d .git; then \
mkdir "$@"; \
fi
.git/hooks/%: etc/git/% | .git/hooks/
$(AM_V_at)if test -d .git; then \
cp "$<" "$@"; \
fi
@ -1260,7 +1266,7 @@ cuirass-jobs: $(GOBJECTS)
fi
COMMIT_MSG_MAGIC = VGhpcyBpcyB0aGUgY29tbWl0LW1zZyBob29rIG9mIEd1aXg=
.git/hooks/commit-msg: etc/git/commit-msg
.git/hooks/commit-msg: etc/git/commit-msg | .git/hooks/
$(AM_V_at)if test -d .git; then \
if test -f $@ && ! grep -qF $(COMMIT_MSG_MAGIC) $@; then \
mkdir -p $@.d && mv $@ $@.d && \