bug#45187: git download defaults to origin/master

2021-04-10 Thread Ludovic Courtès
Hi Kyle, Kyle Meyer skribis: > Subject: [PATCH v2] git: Update cached checkout to the remote HEAD by default. > > Fixes . > Reported by Ricardo Wurmus . > > update-cached-checkout hard codes "master" as the default branch, leading to a > failure when the clone doesn't

bug#45187: git download defaults to origin/master

2021-04-09 Thread Kyle Meyer
Kyle Meyer writes: > @@ -356,6 +360,7 @@ (define* (update-cached-checkout url > > REF is pair whose key is [branch | commit | tag | tag-or-commit ] and value > the associated data: [ | | | ]. > +IF REF is the empty list, the remote HEAD is used. Sorry, here and ... > @@ -433,12 +439,13 @@

bug#45187: git download defaults to origin/master

2021-04-09 Thread Kyle Meyer
Ludovic Courtès writes: > Kyle Meyer skribis: [...] >>git-checkout make-git-checkout >>git-checkout? >>(url git-checkout-url) >> - (branch git-checkout-branch (default "master")) >> + (branch git-checkout-branch (default #f)) >> + (symref git-checkout-symref (default "HEAD")

bug#45187: git download defaults to origin/master

2021-04-09 Thread Ludovic Courtès
Hi! Kyle Meyer skribis: > Subject: [PATCH] git: Update cached checkout to the remote HEAD by default. > > Fixes . > Reported by Ricardo Wurmus . > > update-cached-checkout hard codes "master" as the default branch, leading to a > failure when the clone doesn't have a

bug#45187: git download defaults to origin/master

2021-04-08 Thread Ricardo Wurmus
Hi, I’d just like to say that I successfully used Kyle’s first patch to get past the problem. Thank you! I’m a bit lost: is there something we need to decide on to move this forward? (The issue has become a bit more pressing as origin/main is the new default on Github since a while.) -- Ricar

bug#45187: git download defaults to origin/master

2020-12-14 Thread Kyle Meyer
Ludovic Courtès writes: >> (define* (update-cached-checkout url >> #:key >> - (ref '(branch . "master")) >> + (ref '(symref . >> "refs/remotes/origin/HEAD")) >> rec

bug#45187: git download defaults to origin/master

2020-12-14 Thread Ludovic Courtès
Hi, Kyle Meyer skribis: > diff --git a/guix/git.scm b/guix/git.scm > index ca77b9f54b..7320c0d6c8 100644 > --- a/guix/git.scm > +++ b/guix/git.scm > @@ -207,6 +207,9 @@ (define (resolve-reference repository ref) > (let ((oid (reference-target > (branch-lookup reposito

bug#45187: git download defaults to origin/master

2020-12-14 Thread Ludovic Courtès
Hi! Marius Bakke skribis: > I wonder if there was a specific reason to not use 'revparse-single', > and instead mostly reinvent it with (resolve-reference ...). It must have been ignorance on my side, but also the fact that something like ‘revparse-single’ has to guess what it is you’re looking

bug#45187: git download defaults to origin/master

2020-12-13 Thread Kyle Meyer
Marius Bakke writes: > Kyle Meyer skriver: > >> One option may be to use the remote HEAD symref. [...] >> Here's a quick and dirty demo that makes your reproducer work. A real >> patch in this direction would of course look very different. > > Another quick and dirty patch to make this specifi

bug#45187: git download defaults to origin/master

2020-12-13 Thread Marius Bakke
Kyle Meyer skriver: > Ricardo Wurmus writes: > >> 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 gi

bug#45187: git download defaults to origin/master

2020-12-11 Thread Kyle Meyer
Ricardo Wurmus writes: > 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 > s

bug#45187: git download defaults to origin/master

2020-12-11 Thread Ricardo Wurmus
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