From mboxrd@z Thu Jan 1 00:00:00 1970 From: konstantin at linuxfoundation.org (Konstantin Ryabitsev) Date: Fri, 30 Mar 2018 13:44:13 -0400 Subject: RFC: snapshot tarball information in refs/notes/snapshots In-Reply-To: <20180330163829.GC2287@john.keeping.me.uk> References: <20180320212336.GA19694@work> <20180321140311.GA10698@work> <20180330115357.GA2287@john.keeping.me.uk> <20180330153838.GA26612@gmail.com> <20180330163829.GC2287@john.keeping.me.uk> Message-ID: <20180330174413.GA3603@gmail.com> On Fri, Mar 30, 2018 at 05:38:29PM +0100, John Keeping wrote: > > One other way I'd thought about doing this is via a post-update hook > > that would read the configuration from an object in the repo into a file > > cgit could read, but I didn't want to write out into .git/config. > > > > That might be one way of achieving compromise -- support per-repository > > configuration that users themselves can push, but make it up to the > > server administrator to set up hooks so that the config gets written out > > into .git/cgitrc (or repo.git/cgitrc) for cgit to consume. In my mind, > > it was a note attached to the initial commit of the master branch, but > > it can be any object that post-update can access and write out. > > > > This way cgit doesn't need to rely on git to read this data, as it's a > > regular config file inside the git dir. The post-update hook can also do > > any sanitization of config parameters it deems necessary. > > > > Does that make sense? > > Yes, repo.git/cgitrc is already read unconditionally when using > scan-path to find repositories (under the same conditions as > .git/config). Zomg, I had no idea, nice! > I don't think notes are the right solution because they tie information > to a particular commit and it's difficult to consistently pick a commit > from which to pull the configuration: anything other than the tip of a > branch will incur the cost of walking to find an annotated commit but > keeping the note at the tip of the branch is difficult and likely to > result in the configuration being lost. Yeah, you're right about notes here. That said, I still want to be able to pass tarball info and pgp signatures via notes attached to tags, per my original RFC. :) We can drop the cgitrc configuration conversation for now, since post-update hook with writing out of per-repo cgitrc will work for me just fine -- especially if it already works as-is. Best, -K