From f36522416e69d95f222fdfa6404d1981eb5225b6 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Tue, 11 Oct 2022 11:19:54 +0200 Subject: 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. --- guix/inferior.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'guix/inferior.scm') 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 -- cgit v1.2.3