diff --git a/guix/channels.scm b/guix/channels.scm index 476d62e1f4..a5283b4bf4 100644 --- a/guix/channels.scm +++ b/guix/channels.scm @@ -122,7 +122,7 @@ channel? (name channel-name) (url channel-url) - (branch channel-branch (default "master")) + (branch channel-branch (default #f)) (commit channel-commit (default #f)) (introduction channel-introduction (default #f)) (location channel-location @@ -179,7 +179,6 @@ to the corresponding bytevector." (define %default-guix-channel (channel (name 'guix) - (branch "master") (url %default-channel-url) (introduction %guix-channel-introduction))) @@ -225,7 +224,9 @@ introduction, add it." "Return the \"reference\" for CHANNEL, an sexp suitable for 'latest-repository-commit'." (match (channel-commit channel) - (#f `(branch . ,(channel-branch channel))) + (#f (if (channel-branch channel) + `(branch . ,(channel-branch channel)) + '())) ;remote HEAD (commit `(commit . ,(channel-commit channel))))) (define sexp->channel-introduction diff --git a/guix/inferior.scm b/guix/inferior.scm index 7c8e478f2a..3db63167fd 100644 --- a/guix/inferior.scm +++ b/guix/inferior.scm @@ -732,7 +732,10 @@ prefix, resolve it; and if 'commit' is unset, fetch CHANNEL's branch tip." (branch (channel-branch channel))) (if (and commit (= (string-length commit) 40)) commit - (let* ((ref (if commit `(commit . ,commit) `(branch . ,branch))) + (let* ((ref (cond + (commit `(commit . ,commit)) + (branch `(branch . ,branch)) + (else '()))) ;remote HEAD (cache commit relation (update-cached-checkout (channel-url channel) #:ref ref