summaryrefslogtreecommitdiff
path: root/guix/scripts/git
AgeCommit message (Collapse)Author
2026-04-10guix: openpgp: Refactor openpgp-fingerprint->bytevector.Nicolas Graves
Both (guix channel) and (guix git-authenticate) use similar procedures. To refactor the one in (guix git-authenticate), move the procedure to (guix openpgp). * guix/channels.scm: Replace autoloaded import openpgp-public-key-fingerprint with openpgp-fingerprint->bytevector. (openpgp-fingerprint->bytevector): Move function definition from here... * guix/openpgp.scm (openpgp-fingerprint->bytevector): ...to here. * guix/git-authenticate.scm (read-authorizations): Use openpgp-fingerprint->bytevector. * guix/scripts/git/authenticate.scm: Avoid using the (guix channels) module. * tests/git-authenticate.scm : Likewise. Change-Id: Ifd20588fcfaab601990098bd8575ee985e87394a Reviewed-by: Danny Milosavljevic <dannym@friendly-machines.com> Signed-off-by: Nguyễn Gia Phong <cnx@loang.net>
2025-06-30git authenticate: Create Git hooks directory.Brice Waegeneire
* guix/scripts/git/authenticate.scm (install-hooks): Create Git hooks directory if necessary. Change-Id: Icb9b0674d42af78fe03a3c820369f8324db960b4 Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-06-22git authenticate: Do nothing when invoked from the keyring branch.Ludovic Courtès
Fixes <https://issues.guix.gnu.org/78283>. * guix/scripts/git/authenticate.scm (guix-git-authenticate): Call ‘current-branch’ and do nothing if it returns the keyring branch. Reported-by: Vagrant Cascadian <vagrant@debian.org> Change-Id: I66c2a3f4babf68ac1df0913db6bc708ac0c7968e
2025-06-22git authenticate: Gracefully handle passing an annotated tag to ‘--end’.Ludovic Courtès
Partly fixes <https://issues.guix.gnu.org/74583>. Previously, passing an annotated tag to ‘--end’, as can happen when ‘guix git authenticate’ is invoked by the pre-push hook when pushing tags, would lead to an error: guix git: error: Git error: the requested type does not match the type in the ODB * guix/scripts/git/authenticate.scm (ensure-commit-id): New procedure. (guix-git-authenticate): Use it. * tests/guix-git-authenticate.sh: Test with $v1_2_0_annotated_tag. Change-Id: I22e8eb665609522c80c1f0dcb9e77a46c23c0c3c
2025-06-22git authenticate: Upgrade pre-push hook with a fixed version.Ludovic Courtès
Partly fixes <https://issues.guix.gnu.org/74583>. * guix/scripts/git/authenticate.scm (%pre-push-hook): New variable. (install-hooks): Use it. (broken-pre-push-hook?, maybe-upgrade-hooks): New procedures. (guix-git-authenticate): Call ‘maybe-upgrade-hooks’ when ‘configured?’ returns true. Change-Id: I39d34ab66ffe0f34170c0f562e9f97f2f69c9fdc
2025-06-22git authenticate: Remove support for Guile-Git < 0.7.0.Ludovic Courtès
Guile-Git 0.7.0 was released in May 2024. * guix/scripts/git/authenticate.scm (record-configuration): Remove ‘module-defined?’ condition for Guile-Git < 0.7.0. (install-hooks): Likewise. Change-Id: I27af82068b989d6a18ff1a66453e0a8d397ed380
2024-05-01git authenticate: Install pre-push and post-checkout hooks.Ludovic Courtès
* guix/scripts/git/authenticate.scm (install-hooks): New procedure. (guix-git-authenticate): Use it. * doc/guix.texi (Invoking guix git authenticate): Document it. Change-Id: I4464a33193186e85b476a12740e54412bd58429c
2024-05-01git authenticate: Print something upon success.Ludovic Courtès
Until now the command would be silent and exit with 0. * guix/scripts/git/authenticate.scm (guix-git-authenticate): Print something upon success. Change-Id: I08d086c35df6ac74ee847df0479660293c68987d
2024-05-01git authenticate: Discover the repository.Ludovic Courtès
This allows one to run ‘guix git authenticate’ from a sub-directory of the checkout. * guix/scripts/git/authenticate.scm (%default-options): Remove ‘directory’ key. (guix-git-authenticate): Use ‘repository-discover’ when ‘directory’ option is missing. Change-Id: Ifada00d559254971ed7eeb8c0a8d4ae74ff3defc
2024-05-01git authenticate: Record introduction and keyring in ‘.git/config’.Ludovic Courtès
* guix/scripts/git/authenticate.scm (%default-options): Remove ‘keyring-reference’. (config-value, configured-introduction, configured-keyring-reference) (configured?, record-configuration, current-branch): New procedures. (guix-git-authenticate)[missing-arguments]: New procedure. Use ‘configured-introduction’ when zero arguments are given. Use ‘configured-keyring-reference’ when ‘-k’ is not passed. Add call to ‘record-configuration’. * doc/guix.texi (Invoking guix git authenticate): Document it. Change-Id: I66e111a83f50407b52da71662629947f83a78bbc
2024-03-19git authenticate: Document ‘--end’.Ludovic Courtès
* guix/scripts/git/authenticate.scm (show-help): Document ‘--end’. * doc/guix.texi (Invoking guix git authenticate): Likewise. Reported-by: Tomas Volf <~@wolfsden.cz> Change-Id: Ia646203ce2f721487de547c76b9488754c70db66
2024-02-12git authenticate: Gracefully handle invalid fingerprints.Ludovic Courtès
Previously the command would crash when passed an invalid fingerprint on the command line. * guix/scripts/git/authenticate.scm (guix-git-authenticate) [openpgp-fingerprint*]: New procedure. Use it instead of ‘openpgp-fingerprint’. Change-Id: I99e0549781382f36a684a84449b603e00b53778d
2020-07-11Add 'guix git authenticate'.Ludovic Courtès
* guix/scripts/git.scm, guix/scripts/git/authenticate.scm, tests/guix-git-authenticate.sh: New files. * Makefile.am (MODULES): Add the *.scm files. (SH_TESTS): Add 'tests/guix-git-authenticate.sh'. * doc/guix.texi (Channels)[Specifying Channel Authorizations]: Mention 'guix git authenticate'. (Invoking guix git authenticate): New node. * po/guix/POTFILES.in: Add 'guix/scripts/git.scm' and 'guix/scripts/git/authenticate.scm'.