diff options
Diffstat (limited to 'guix/git.scm')
-rw-r--r-- | guix/git.scm | 4 |
1 files changed, 4 insertions, 0 deletions
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 @@ 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." |