[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#70132] [PATCH 03/11] channels: Move ‘commit-short-id’ to (guix git)
From: |
Ludovic Courtès |
Subject: |
[bug#70132] [PATCH 03/11] channels: Move ‘commit-short-id’ to (guix git). |
Date: |
Mon, 1 Apr 2024 22:25:15 +0200 |
* guix/channels.scm (commit-short-id): Move to…
* guix/git.scm (commit-short-id): … here.
Change-Id: If4b34b1d82b1aa5068d157f26e57e8aecc967061
---
guix/channels.scm | 4 +---
guix/git.scm | 4 ++++
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/guix/channels.scm b/guix/channels.scm
index f26ccbc3ae..0b776ab211 100644
--- a/guix/channels.scm
+++ b/guix/channels.scm
@@ -25,6 +25,7 @@ (define-module (guix channels)
url+commit->name
commit-difference
repository-info
+ commit-short-id
with-repository)
#:autoload (guix git-authenticate) (authenticate-repository)
#:autoload (guix openpgp) (openpgp-public-key-fingerprint
@@ -339,9 +340,6 @@ (define (apply-patches checkout commit patches)
(apply-patch patch checkout))
(loop rest)))))
-(define commit-short-id
- (compose (cut string-take <> 7) oid->string commit-id))
-
(define* (authenticate-channel channel checkout commit
#:key (keyring-reference-prefix "origin/"))
"Authenticate the given COMMIT of CHANNEL, available at CHECKOUT, a
diff --git a/guix/git.scm b/guix/git.scm
index 760b064a9c..eab84ea798 100644
--- a/guix/git.scm
+++ b/guix/git.scm
@@ -67,6 +67,7 @@ (define-module (guix git)
commit-relation
commit-descendant?
commit-id?
+ commit-short-id
remote-refs
@@ -233,6 +234,9 @@ (define (commit-id? str)
(and (= (string-length str) 40)
(string-every char-set:hex-digit str)))
+(define commit-short-id
+ (compose (cut string-take <> 7) oid->string commit-id))
+
(define (resolve-reference repository ref)
"Resolve the branch, commit or tag specified by REF, and return the
corresponding Git object."
--
2.41.0
- [bug#70132] [PATCH 00/11] Improve startup time and memory footprint for short-lived commands, Ludovic Courtès, 2024/04/01
- [bug#70132] [PATCH 03/11] channels: Move ‘commit-short-id’ to (guix git).,
Ludovic Courtès <=
- [bug#70132] [PATCH 01/11] channels: Use SRFI-71 instead of SRFI-11., Ludovic Courtès, 2024/04/01
- [bug#70132] [PATCH 04/11] git: Add ‘tag->commit’ and use it in (guix channels)., Ludovic Courtès, 2024/04/01
- [bug#70132] [PATCH 05/11] channels: Autoload (git …) modules., Ludovic Courtès, 2024/04/01
- [bug#70132] [PATCH 02/11] git: Add ‘repository-info’ and use it in (guix channels)., Ludovic Courtès, 2024/04/01
- [bug#70132] [PATCH 06/11] guix system: Autoload some more., Ludovic Courtès, 2024/04/01
- [bug#70132] [PATCH 10/11] Autoload (guix build syscalls)., Ludovic Courtès, 2024/04/01
- [bug#70132] [PATCH 11/11] Autoload (gcrypt hash)., Ludovic Courtès, 2024/04/01
- [bug#70132] [PATCH 08/11] guix: Delay loading of (gnutls)., Ludovic Courtès, 2024/04/01