RFC: snapshot tarball information in refs/notes/snapshots
konstantin at linuxfoundation.org
Fri Mar 30 17:38:38 CEST 2018
On Fri, Mar 30, 2018 at 12:53:57PM +0100, John Keeping wrote:
> Unfortunately there is one big gotcha I encountered doing this, which is
> that we don't have the repository set up when we are scanning this
> configuration, because this is done when building the repository list
> not just for loading repository-specific pages. Since one of the
> configuration options is the repository description, I think this is
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?
More information about the CGit