summaryrefslogtreecommitdiff
path: root/guix/inferior.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2022-10-11 11:19:54 +0200
committerLudovic Courtès <ludo@gnu.org>2022-10-17 09:37:27 +0200
commitf36522416e69d95f222fdfa6404d1981eb5225b6 (patch)
tree7110dc419904e6431f7bd13c6e3ef21b2f622b6d /guix/inferior.scm
parent46f7011591601b4783b2dc2c7252c41564ca0140 (diff)
channels: Interpret the 'commit' field of channel as a tag or commit.
Previously the 'commit' field would always be interpreted as a commit ID. This change adds flexibility, allowing for things like: guix time-machine --commit=v1.2.0 -- describe * guix/channels.scm (channel-reference): Use 'tag-or-commit' rather than 'commit'. * guix/inferior.scm (channel-full-commit): Likewise. * doc/guix.texi (Invoking guix pull): Document it. (Invoking guix time-machine): Likewise.
Diffstat (limited to 'guix/inferior.scm')
-rw-r--r--guix/inferior.scm2
1 files changed, 1 insertions, 1 deletions
diff --git a/guix/inferior.scm b/guix/inferior.scm
index cbb3c0a36e..2fe34ca0dc 100644
--- a/guix/inferior.scm
+++ b/guix/inferior.scm
@@ -835,7 +835,7 @@ prefix, resolve it; and if 'commit' is unset, fetch CHANNEL's branch tip."
(branch (channel-branch channel)))
(if (and commit (commit-id? commit))
commit
- (let* ((ref (if commit `(commit . ,commit) `(branch . ,branch)))
+ (let* ((ref (if commit `(tag-or-commit . ,commit) `(branch . ,branch)))
(cache commit relation
(update-cached-checkout (channel-url channel)
#:ref ref