emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#45187: closed (git download defaults to origin/master)


From: GNU bug Tracking System
Subject: bug#45187: closed (git download defaults to origin/master)
Date: Sat, 10 Apr 2021 19:34:02 +0000

Your message dated Sat, 10 Apr 2021 21:33:00 +0200
with message-id <874kge2avn.fsf@gnu.org>
and subject line Re: bug#45187: git download defaults to origin/master
has caused the debbugs.gnu.org bug report #45187,
regarding git download defaults to origin/master
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
45187: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=45187
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: git download defaults to origin/master Date: Fri, 11 Dec 2020 22:02:40 +0100 User-agent: mu4e 1.4.13; emacs 27.1
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



--- End Message ---
--- Begin Message --- Subject: Re: bug#45187: git download defaults to origin/master Date: Sat, 10 Apr 2021 21:33:00 +0200 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Hi Kyle,

Kyle Meyer <kyle@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@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’.


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]