From mboxrd@z Thu Jan 1 00:00:00 1970 From: terrence.j.dunnigan at boeing.com (Dunnigan, Terrence J) Date: Tue, 22 Sep 2015 21:14:39 +0000 Subject: cgit can't display certain file hashes In-Reply-To: <20150918175136.GK17201@serenity.lan> References: <9AD8B655B5126D4FAE1397203CDDBF2D214349@XCH-PHX-205.sw.nos.boeing.com> <20150918175136.GK17201@serenity.lan> Message-ID: <9AD8B655B5126D4FAE1397203CDDBF2D21B73A@XCH-PHX-205.sw.nos.boeing.com> Thanks John, that has helped. Terry -----Original Message----- 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: > https://cgit/repo.git/blob/src.cpp?id=eee. > > 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.