summaryrefslogtreecommitdiff
path: root/etc/git
AgeCommit message (Collapse)Author
2026-03-24etc: Ensure guix.authenticate section is populated in post-merge hook.Maxim Cournoyer
This provides some extra automation. * etc/git/post-merge [!guix.authenticate.introduction-commit]: Run initial 'guix authenticate' command, as documented in (info "(guix) Building from Git"). Fixes: <https://issues.guix.gnu.org/80564> Change-Id: I5775514c6b8785213e2d0e834bdd7e3a961c8930 Reported-by: Tomas Volf <~@wolfsden.cz>
2025-07-31gitconfig: Relax useAutoBase.Maxim Cournoyer
It can be useful to produce patches from older commits, for example to share commits from the keyring branch between the main Guix repository and guix-maintenance. The previous 'true' value prevented that with a fatal error message. * etc/git/gitconfig [format] <useAutoBase>: Set to whenAble. Change-Id: Ib32407dd3695dcadcb16855b1b87147fabc2aca7
2025-07-20etc: pre-push: Skip checks when pushing to the keyring branch.Maxim Cournoyer
Attempting to push new commits to the branch would previously fail like: error: commit X is not a descendant of introductory commit 1m9edb3f66fd807b096b48283debdcddccfea34bad * etc/git/pre-push (main): Skip checks when pushing to refs/heads/keyring. Change-Id: I3ea20a10b6c8cc6b6c6f948f80bed902850214c5
2025-06-08etc: Git pre-push hook: Don't allow pushes to Savannah.Leo Famulari
* etc/git/pre-push: Throw an error when pushing to savannah.gnu.org. Change-Id: I1fefa4d93daf0f2887168c54a244b9be5d220665
2025-06-04etc: pre-push Git hook: Update the commentary.Leo Famulari
* etc/git/pre-push: Improve comments. Change-Id: Id8c97841c3fa362de7adbd8942f796d044ce50b1
2025-06-04etc: pre-push git hook: Also check Codeberg SSH remote.Hilton Chain
* etc/git/pre-push (main): Check Codeberg SSH remote. Fixes: #421 Change-Id: Id669259f510cf3e33cadf77a5c9eeada52a5d0dd
2025-05-30etc: pre-push Git hook: Reduce code duplication.Leo Famulari
* etc/git/pre-push (perform_checks): New function. Change-Id: Ieff1e2c225e3720c96c75ca55abfb883dd386f5c
2025-05-27etc: pre-push Git hook: Make portable to current Debian.Leo Famulari
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-27etc: pre-push: Do not use recent ;& case statement terminator.Maxim Cournoyer
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-27etc: Untabify pre-push hook.Maxim Cournoyer
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-26etc: pre-push: Skip checks on AGit pull requests.Liliana Marie Prikler
* 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-26etc: pre-push: Enforce checks on Codeberg.lilyp
* 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-02-22etc: Update the commit-msg hook.Maxim Cournoyer
Update our copy to the latest version retrieved from <https://gerrit.googlesource.com/gerrit/+/refs/heads/master/resources/com/google/gerrit/server/tools/root/hooks/commit-msg>. This change contains an improved version which avoids creating duplicate Change-Id git trailer when rebasing. * etc/git/commit-msg: Update to latest version, taking care to preserve our changes. Change-Id: Ie6ae6aa5e81cd4fce28a6be5cd68ca0a61cdebc0
2025-02-16maint: Actually run ‘make check-channel-news’ in pre-push hook.Ludovic Courtès
Fixes a bug introduced in ab9cda9ebd00073d5a0783919809f2e564f141e9 where ‘make check-channel-news’ would not longer be executed. * etc/git/pre-push: Remove ‘exec’ before ‘guix git authenticate’. Change-Id: Ic425db866e44695493be96a0a8c81c77c815e42d
2025-01-05etc: git: pre-push: Run guix git authenticate before check-channel-news.Vagrant Cascadian
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.
2024-05-25maint: Suggest ‘guix git authenticate’ for initial authentication.Ludovic Courtès
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-01-24gitconfig: b4: Automatically add 'Signed-off-by' when applying patches.Maxim Cournoyer
Also use --3way to ease conflict resolutions. * etc/git/gitconfig [b4]: Add shazam-am-flags option. Change-Id: I6a92909a5b23a8680c16251aafa084b9a48944ea
2023-11-07doc: Add some guidelines for reviewing.Maxim Cournoyer
* doc/contributing.texi (Contributing) [Reviewing the Work of Others]: New section. (Debbugs Usertags): Expound with Emacs Debbugs information and document the 'reviewed-looks-good' usertag. * etc/git/gitconfig [b4]: New section. Change-Id: I56630b15ec4fbc5c67e5420dbf2838556a005d6b Reviewed-by: Ludovic Courtès <ludo@gnu.org>
2023-10-22build: Add a commit-msg hook that embeds Change-Id in commit messages.Maxim Cournoyer
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>
2023-05-18etc: gitconfig: Do not enforced signed commits.Maxim Cournoyer
This change was more invasive than initially thought, and cannot be disabled easily, as raised by a few people. Let's revert it for now. At least the pre-push hook should be deployed automatically and catch any unsigned commits attempted to be pushed to Savannah. * etc/git/gitconfig [commit]: Remove section.
2023-05-01Makefile.am: Auto-configure Git on 'make'.Maxim Cournoyer
This means we do not need to worry anymore about manually syncing the pre-push git hook or the Guix-provided git configuration. * etc/git/gitconfig: Augment configuration template with useful options to allow for auto-configuration. * Makefile.am (.git/hooks/pre-push, .git/config): New targets. (nodist_noinst_DATA): New primary variable holding the above targets.
2021-10-14Add git configuration templates to improve diff hunk header detection.Sarah Morgensen
This is a follow-up to commit 9fc8ae4171e5da4939a64fc6d684c8b9d85bbe84, which missed two hunks from <https://issues.guix.gnu.org/50363>. Reported by hackeryarn on #guix. * .gitattributes, etc/git/gitconfig: New files. Signed-off-by: Marius Bakke <marius@gnu.org>
2020-12-14maint: Only run `make authenticate` when pushing commits.Leo Famulari
* etc/git/pre-push: Exit early when deleting a branch.
2020-06-01maint: Adjust comment in 'pre-push' hook.Ludovic Courtès
* etc/git/pre-push: Adjust comment.
2020-05-29maint: Git pre-push hook runs "make authenticate check-channel-news".Ludovic Courtès
* etc/git/pre-push: Change to run "make authenticate check-channel-news".
2017-02-08etc: The pre-push hook says which commits failed the signature check.Leo Famulari
* etc/git/pre-push: Check each commit's signature individually so that we can report which commits fail the check.
2017-01-04doc: Add a Git hook that verifies signatures before pushing.Leo Famulari
* HACKING (Commit Access): Describe the pre-push Git hook. * etc/git/pre-push: New file.