@@ -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
@@ -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."