#881831 Please display refs that do exist even if HEAD is missing

Package:
cgit
Source:
cgit
Description:
hyperfast web frontend for git repositories written in C
Submitter:
Mattia Rizzolo
Date:
2017-11-15 17:03:07 UTC
Severity:
normal
#881831#3
Date:
2017-11-15 16:24:33 UTC
From:
To:
https://browse.dgit.debian.org/chicken.git/ currently shows an empty
repository, because the only upload done through dgit only hit
experimental.

<Diziet> I think cgit has some thing where it won't display anything if there is no HEAD
<Diziet> And the repos' HEAD is master by default
<Diziet> The server updates master automatically if you upload to sid, but not when you upload to experimental
<mapreri> right, I haven't yet uploaded to unstable (which I will soonish anyway), but I expected cgit it to show me exp now anyway
<Diziet> I agree that it ought to.

#881831#8
Date:
2017-11-15 16:43:45 UTC
From:
To:
reassign -1 cgit
retitle -1 Please display refs that do exist even if HEAD is missing
thanks

Hi, cgit maintainers.  I have a request for a behavioural change:

Mattia Rizzolo writes ("Bug#881831: dgit-infrastructure: doesn't show anything on cgit when the only digt push hit only experimental"):

The repository in question is in the following state:

  iwj@gideon:/srv/dgit.debian.org/repos/chicken.git$ git for-each-ref --format='%(refname)'
  refs/dgit/experimental
  refs/tags/archive/debian/4.12.0-0.2
  refs/tags/debian/4.12.0-0.2
  iwj@gideon:/srv/dgit.debian.org/repos/chicken.git$ git symbolic-ref HEAD
  refs/heads/master
  iwj@gideon:/srv/dgit.debian.org/repos/chicken.git$ git rev-parse HEAD
  HEAD
  iwj@gideon:/srv/dgit.debian.org/repos/chicken.git$

cgit just displays "Repository seems to be empty", even at
https://browse.dgit.debian.org/chicken.git/refs/
even though there are several refs, as you can see.  (NB that cgit is
running on an rsync mirror of the repo, but I don't think that is
relevant.)

Compare

  iwj@gideon:/srv/dgit.debian.org/repos/dgit.git$ git for-each-ref --format='%(refname)' | grep -v refs/tags
  refs/dgit/experimental
  refs/dgit/jessie-backports
  refs/dgit/sid
  refs/dgit/stretch
  refs/heads/master
  iwj@gideon:/srv/dgit.debian.org/repos/dgit.git$ git symbolic-ref HEAD
  refs/heads/master
  iwj@gideon:/srv/dgit.debian.org/repos/dgit.git$ git rev-parse HEAD
  b363aeb4b0228eff6ad85229946feeb3b4d92b77
  iwj@gideon:/srv/dgit.debian.org/repos/dgit.git$

And see

https://browse.dgit.debian.org/dgit.git/

I think that this HEAD-less state is appropriate for Mattia's repo.
It would be better if cgit displayed its contents.

Regards,
Ian.