summaryrefslogtreecommitdiff
path: root/guix/git.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2019-07-26 11:09:56 +0200
committerLudovic Courtès <ludo@gnu.org>2019-07-26 11:21:36 +0200
commit177fecb57c0c9e15249bf6a49244c9dc6eb8439c (patch)
treeeee85cf5f6b1f14171a5cc07ed21f721e7bdd300 /guix/git.scm
parentc4c2449fea9b7fd78f61ffb9bbe19ab2ef6c8b41 (diff)
downloadguix-patches-177fecb57c0c9e15249bf6a49244c9dc6eb8439c.tar
guix-patches-177fecb57c0c9e15249bf6a49244c9dc6eb8439c.tar.gz
git: <git-checkout> allows tags in its 'commit' field.
Fixes <https://bugs.gnu.org/36371>. Reported by Tobias Geerinckx-Rice <me@tobias.gr>. * guix/git.scm (git-checkout-compiler): Pass 'tag-or-commit' to 'latest-repository-commit*'. * doc/guix.texi (Package Transformation Options): Update '--with-commit' documentation accordingly. * tests/guix-build-branch.sh: Add test.
Diffstat (limited to 'guix/git.scm')
-rw-r--r--guix/git.scm4
1 files changed, 2 insertions, 2 deletions
diff --git a/guix/git.scm b/guix/git.scm
index fb2df2de07..85252629fc 100644
--- a/guix/git.scm
+++ b/guix/git.scm
@@ -330,7 +330,7 @@ Log progress and checkout info to LOG-PORT."
git-checkout?
(url git-checkout-url)
(branch git-checkout-branch (default "master"))
- (commit git-checkout-commit (default #f))
+ (commit git-checkout-commit (default #f)) ;#f | tag | commit
(recursive? git-checkout-recursive? (default #f)))
(define* (latest-repository-commit* url #:key ref recursive? log-port)
@@ -369,7 +369,7 @@ Log progress and checkout info to LOG-PORT."
(($ <git-checkout> url branch commit recursive?)
(latest-repository-commit* url
#:ref (if commit
- `(commit . ,commit)
+ `(tag-or-commit . ,commit)
`(branch . ,branch))
#:recursive? recursive?
#:log-port (current-error-port)))))