cgit can't display certain file hashes
Dunnigan, Terrence J
terrence.j.dunnigan at boeing.com
Tue Sep 22 23:14:39 CEST 2015
Thanks John, that has helped.
From: John Keeping [mailto:john at keeping.me.uk]
Sent: Friday, September 18, 2015 12:52 PM
To: Dunnigan, Terrence J
Cc: cgit at lists.zx2c4.com
Subject: Re: cgit can't display certain file hashes
On Fri, Sep 18, 2015 at 05:23:32PM +0000, Dunnigan, Terrence J wrote:
> From time to time our cgit server (0.10.1) won't display a particular
> version of a file.
> Say we have a file src.cpp in the repo repo.git. It has been modified
> five times, and the five file hashes are aaa, bbb, ccc, ddd, and eee.
> Aaa is the first commit and eee is the most recent commit.
> We use this URL to display certain versions of the file:
> For whatever reason, all hashes are displaying except the penultimate
> commit, ddd.
> https://cgit/repo.git/blob/src.cpp?id=eee displays the file just fine.
> https://cgit/repo.git/blob/src.cpp?id=ddd displays an error message
> "No repositories found".
> The commit exists in the repo - I can see the file hash ddd listed via
> the command git ls-tree, so I'm very confused why cgit isn't able to
> display the file.
> I know our version of cgit is an older version - was this a bug fixed
> in subsequent releases?
Do you have caching enabled? By default "static" content accessed with a fixed SHA-1 will be cached forever; I recommend changing "cache-static-ttl" to something like 15 to see if that makes a difference.
A recent commit c5975ae (ui-shared: cache errors for "dynamic TTL",
2015-08-14) changed this so that anything that results in an error will use the "dynamic" cache timeout, but there has not been a release since this went in.
More information about the CGit