Subject: [bug#49252] [PATCH] Channels defaulting to HEAD instead of ‘master’

From: Kyle Meyer <[email-masked]>
Date: Sun, 08 Aug 2021 19:08:06 -0400

Ricardo Wurmus writes:

> For what it’s worth I found the same kind of problem when 
> importing an R package from Github:
>
>    ./pre-inst-env guix import cran -a git 
>    https://github.com/ImmuneDynamics/Spectre
>
> Here’s the error backtrace:
[...]
>
> ice-9/boot-9.scm:1685:16: In procedure raise-exception:
> Git error: reference 'refs/remotes/origin/HEAD' not found
> --8<---------------cut here---------------end--------------->8---
>
>> Presumably we have a server-side setup issue at Savannah?
>
> I think it might be a repository setting rather than a server 
> setting as other Github repositories work, yet this one repo on 
> Github does not.

Hmm, I'm not sure what's going on here, but, as with
<https://git.savannah.gnu.org/git/guix.git>, if I clone the above repo
via `git clone', refs/remotes/origin/HEAD is there:

  $ git ls-remote https://github.com/ImmuneDynamics/Spectre | grep HEAD
  742ebc4bc09ce69b970eceb78291bdbf5229d20d	HEAD

  $ git clone https://github.com/ImmuneDynamics/Spectre && cd Spectre
  $ git for-each-ref refs/remotes/origin | grep HEAD
  742ebc4bc09ce69b970eceb78291bdbf5229d20d commit	refs/remotes/origin/HEAD