me
/
guix
Archived
1
0
Fork 0

channels: Move ‘commit-short-id’ to (guix git).

* guix/channels.scm (commit-short-id): Move to…
* guix/git.scm (commit-short-id): … here.

Change-Id: If4b34b1d82b1aa5068d157f26e57e8aecc967061
master
Ludovic Courtès 2024-03-31 23:17:29 +02:00
parent a57518484e
commit 088e181c0a
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
2 changed files with 5 additions and 3 deletions

View File

@ -25,6 +25,7 @@
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 @@ result is unspecified."
(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

View File

@ -67,6 +67,7 @@
commit-relation
commit-descendant?
commit-id?
commit-short-id
remote-refs
@ -233,6 +234,9 @@ is a tag name. This is based on a simple heuristic so use with care!"
(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."