Nesting repositories under a common folder?

John Keeping john at keeping.me.uk
Wed Jul 24 20:43:31 CEST 2019


On Wed, Jul 24, 2019 at 01:01:27PM -0500, Reuben Popp wrote:
> Excuse me if this has been answered before, but is there a way to nest
> repositories under a common directory visually in cgit?
> 
> For example,
> 
> root_directory (not a repo)
> |- Project A (directory, not a repo)
> |       |- Project A component 1 (repo)
> |       |- Project A component 2 (repo)
> |- Project B (repo)
> |- Project C (directory, not a repo)
> |       |- Project C subproject AA (repo)
> |       |- Project C subproject AB (repo)
> |       |- Project C Archive (directory, not a repo)
> |              |- Project C archived subproject A (repo)
> etc.
> 
> Going to the cgit frontend, I would see the directories (or links) for
> Project A, B and C...

You can't do exactly this, but you can generate sections from the path
to the repository which adds headings to the list of repositories.  See
"section" and "section-from-path" in cgitrc(5).

For hierarchical paths, it's also possible to view a subset of the tree
by going to (for example) /cgit/directory_a/directory_b/ but I don't
think anything generates links to those sublists.

I remember in the past somewhere had added a custom script to collapse
sections by default, but I can't find a reference for that now.  That
should be reasonably simple by matching on the "reposection" class.


Regards,
John


More information about the CGit mailing list