1
Fork 0
mirror of https://https.git.savannah.gnu.org/git/guix.git/ synced 2025-07-13 18:40:57 +02:00
Commit graph

17 commits

Author SHA1 Message Date
Leo Famulari
69a77ffab2
etc: Git pre-push hook: Don't allow pushes to Savannah.
* etc/git/pre-push: Throw an error when pushing to savannah.gnu.org.

Change-Id: I1fefa4d93daf0f2887168c54a244b9be5d220665
2025-06-08 17:46:34 -04:00
Leo Famulari
027a47787f
etc: pre-push Git hook: Update the commentary.
* etc/git/pre-push: Improve comments.

Change-Id: Id8c97841c3fa362de7adbd8942f796d044ce50b1
2025-06-04 22:55:22 -04:00
Hilton Chain
50b69ecb40
etc: pre-push git hook: Also check Codeberg SSH remote.
* etc/git/pre-push (main): Check Codeberg SSH remote.

Fixes: #421
Change-Id: Id669259f510cf3e33cadf77a5c9eeada52a5d0dd
2025-06-04 22:29:03 -04:00
Leo Famulari
68deb8e3bd
etc: pre-push Git hook: Reduce code duplication.
* etc/git/pre-push (perform_checks): New function.

Change-Id: Ieff1e2c225e3720c96c75ca55abfb883dd386f5c
2025-05-30 17:14:34 -04:00
Leo Famulari
96da4def78
etc: pre-push Git hook: Make portable to current Debian.
Closes #64

The ;& operator was introduced in POSIX.1-2024 "Issue 8", from 2024, but
is not yet available in Debian's dash shell.

* etc/git/pre-push: Duplicate the handling of our two canonical Git repo
URLs.

Change-Id: I1125810c9f2d6fb9a99f7220d971cc38387989d3
2025-05-27 10:11:03 -04:00
Maxim Cournoyer
cedb79a57b
etc: pre-push: Do not use recent ;& case statement terminator.
Some systems are still using a shell that predates its inclusion in the POSIX
specification, such as Debian Bookworm.

* etc/git/pre-push (z40): Remove usage of ';&'.  Fail when attempting to push
to Savannah instead.

Reported-by: Leo Famulari <leo@famulari.name>
Closes: #64
Change-Id: I2dd224b7a3236f7027fc702b96e3ee1ff594d4fa
2025-05-27 11:07:03 +09:00
Maxim Cournoyer
c24b8fadad
etc: Untabify pre-push hook.
There was a mix of spaces and tabs in the file, even confusing Emacs's
dtrt-indent-mode.

* etc/git/pre-push: Untabify.

Change-Id: I2548a3901c5064c649a8f6bb786d606b6155fcfb
2025-05-27 11:05:49 +09:00
Liliana Marie Prikler
be0dbd3e4a
etc: pre-push: Skip checks on AGit pull requests.
* etc/git/pre-push (case "$remote_refs" in refs/for/*): Skip checks.

Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
Fixes: AGit push fails <https://codeberg.org/guix/guix/issues/5>
Tested-by: Hilton Chain <hako@ultrarare.space>
Signed-off-by: Hilton Chain <hako@ultrarare.space>
2025-05-26 10:41:05 +08:00
lilyp
8589191060
etc: pre-push: Enforce checks on Codeberg.
* etc/git/pre-push (case *gnu.org*): Fall-through to…
(case *codeberg.org/guix/*): … this.

Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
Tested-by: Hilton Chain <hako@ultrarare.space>
Signed-off-by: Hilton Chain <hako@ultrarare.space>
2025-05-26 10:41:05 +08:00
Ludovic Courtès
1afbf48b25
maint: Actually run ‘make check-channel-news’ in pre-push hook.
Fixes a bug introduced in ab9cda9ebd where
‘make check-channel-news’ would not longer be executed.

* etc/git/pre-push: Remove ‘exec’ before ‘guix git authenticate’.

Change-Id: Ic425db866e44695493be96a0a8c81c77c815e42d
2025-02-16 00:20:13 +01:00
Vagrant Cascadian
ab9cda9ebd
etc: git: pre-push: Run guix git authenticate before check-channel-news.
Running check-channel-news first could potentially be untrusted code, so
authenticate first.

* etc/git/pre-push: Run guix git authenticate before check-channel-news.
2025-01-05 13:23:54 -08:00
Ludovic Courtès
73b3f941d7
maint: Suggest ‘guix git authenticate’ for initial authentication.
The previous recommendation, running ‘make authenticate’, was insecure
because it led users to run code from the very repository they want to
authenticate:

  https://lists.gnu.org/archive/html/guix-devel/2024-04/msg00252.html

* Makefile.am (commit_v1_0_0, channel_intro_commit)
(channel_intro_signer, GUIX_GIT_KEYRING, authenticate): Remove.
* Makefile.am (.git/hooks/%): New target, generalization of previous
‘.git/hooks/pre-push’ target.
(nodist_noinst_DATA): Add ‘.git/hooks/post-merge’.
* doc/contributing.texi (Building from Git): Suggest ‘guix git
authenticate’ instead of ‘make authenticate’.
* etc/git/post-merge: New file.
* etc/git/pre-push: Run ‘guix git authenticate’ instead of ‘make
authenticate’.

Reviewed-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Reported-by: Skyler Ferris <skyvine@protonmail.com>
Change-Id: Ia415aa8375013d0dd095e891116f6ce841d93efd
2024-05-25 16:23:56 +02:00
Leo Famulari
80ebcdd100
maint: Only run make authenticate when pushing commits.
* etc/git/pre-push: Exit early when deleting a branch.
2020-12-14 12:15:06 -05:00
Ludovic Courtès
6f6758c45d
maint: Adjust comment in 'pre-push' hook.
* etc/git/pre-push: Adjust comment.
2020-06-01 00:51:38 +02:00
Ludovic Courtès
e65a44649e
maint: Git pre-push hook runs "make authenticate check-channel-news".
* etc/git/pre-push: Change to run "make authenticate check-channel-news".
2020-05-29 18:31:38 +02:00
Leo Famulari
f0d0c5bb18
etc: The pre-push hook says which commits failed the signature check.
* etc/git/pre-push: Check each commit's signature individually so that
we can report which commits fail the check.
2017-02-08 03:42:08 +01:00
Leo Famulari
69355e1283
doc: Add a Git hook that verifies signatures before pushing.
* HACKING (Commit Access): Describe the pre-push Git hook.
* etc/git/pre-push: New file.
2017-01-04 16:27:20 -05:00