GNU bug report logs -
#45187
git download defaults to origin/master
Previous Next
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your bug report
#45187: git download defaults to origin/master
which was filed against the guix package, has been closed.
The explanation is attached below, along with your original report.
If you require more details, please reply to 45187 <at> debbugs.gnu.org.
--
45187: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=45187
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
Hi Kyle,
Kyle Meyer <kyle <at> kyleam.com> skribis:
> Subject: [PATCH v2] git: Update cached checkout to the remote HEAD by default.
>
> Fixes <https://bugs.gnu.org/45187>.
> Reported by Ricardo Wurmus <rekado <at> elephly.net>.
>
> update-cached-checkout hard codes "master" as the default branch, leading to a
> failure when the clone doesn't have a "master" branch. Instead use the remote
> HEAD symref as an indicator of what the primary branch is.
>
> * guix/git.scm (resolve-reference): Support resolving symrefs.
> (update-cached-checkout, latest-repository-commit): Change the default for REF
> to the empty list and translate it to the remote HEAD symref.
> (<git-checkout>): Change branch field's default to #f.
> (git-checkout-compiler): When branch and commit fields are both #f, call
> latest-repository-commit* with the empty list as the ref.
> ---
> guix/git.scm | 23 ++++++++++++++++-------
> 1 file changed, 16 insertions(+), 7 deletions(-)
Applied, thanks!
Ludo’.
[Message part 3 (message/rfc822, inline)]
Importing https://github.com/immunogenomics/scpost with the CRAN
importer fails, because the git repository does not have an
origin/master branch. This repository only has a “main” branch.
Arguably, this shouldn’t matter, but (guix git) has the “master” name
set up as the default. When cloning a repository it may be better to
fetch everything and select the default branch — whichever name it may
have.
Here is a reproducer:
--8<---------------cut here---------------start------------->8---
$ guix import cran -r -a git https://github.com/immunogenomics/scpost
Backtrace:
In ice-9/boot-9.scm:
1736:10 19 (with-exception-handler _ _ #:unwind? _ #:unwind-for-type _)
1731:15 18 (with-exception-handler #<procedure 7f65768171e0 at ice-9/boot-9.scm:1815:7…> …)
In guix/scripts/import/cran.scm:
103:26 17 (_)
In guix/import/utils.scm:
458:31 16 (recursive-import "https://github.com/immunogenomics/scpost" # _ #:guix-name …)
449:33 15 (lookup-node "https://github.com/immunogenomics/scpost" #f)
In guix/memoization.scm:
98:0 14 (mproc "https://github.com/immunogenomics/scpost" #:version #f #:repo git)
In unknown file:
13 (_ #<procedure 7f6576843ae0 at guix/memoization.scm:179:32 ()> #<procedure …> …)
In guix/import/cran.scm:
576:24 12 (_ "https://github.com/immunogenomics/scpost" #:repo _ #:version _)
269:25 11 (fetch-description _ "https://github.com/immunogenomics/scpost")
In guix/memoization.scm:
98:0 10 (mproc "https://github.com/immunogenomics/scpost" #:method git)
In unknown file:
9 (_ #<procedure 7f6576843a80 at guix/memoization.scm:179:32 ()> #<procedure …> …)
In ice-9/boot-9.scm:
1736:10 8 (with-exception-handler _ _ #:unwind? _ #:unwind-for-type _)
In guix/store.scm:
632:37 7 (thunk)
In guix/git.scm:
424:8 6 (latest-repository-commit #<store-connection 256.99 7f6577201460> "https://…" …)
240:2 5 (update-cached-checkout _ #:ref _ #:recursive? _ #:check-out? _ # _ # _ # _)
208:19 4 (resolve _)
In git/branch.scm:
101:8 3 (_ _ _ _)
In git/bindings.scm:
77:2 2 (raise-git-error _)
In ice-9/boot-9.scm:
1669:16 1 (raise-exception _ #:continuable? _)
1669:16 0 (raise-exception _ #:continuable? _)
ice-9/boot-9.scm:1669:16: In procedure raise-exception:
Git error: cannot locate remote-tracking branch 'origin/master'
--8<---------------cut here---------------end--------------->8---
--
Ricardo
This bug report was last modified 4 years and 101 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.