From mboxrd@z Thu Jan 1 00:00:00 1970 From: john at keeping.me.uk (John Keeping) Date: Fri, 6 Mar 2015 09:09:30 +0000 Subject: Support for submodules in tree view? In-Reply-To: <9AD8B655B5126D4FAE1397203CDDBF2D12CCA2@XCH-PHX-213.sw.nos.boeing.com> References: <9AD8B655B5126D4FAE1397203CDDBF2D1274B5@XCH-PHX-205.sw.nos.boeing.com> <20150305182553.GF1369@serenity.lan> <9AD8B655B5126D4FAE1397203CDDBF2D12CCA2@XCH-PHX-213.sw.nos.boeing.com> Message-ID: <20150306090930.GH1369@serenity.lan> On Fri, Mar 06, 2015 at 05:58:21AM +0000, Dunnigan, Terrence J wrote: > Do you have an example or two of values for module-link? I didn't see > an example on the sample config file at > http://git.zx2c4.com/cgit/tree/cgitrc.5.txt git-instacgit[0] autogenerates submodule links as: module-link=/cgit/submodule/%s/commit?id=%s then adds the submodule repositories as something like: repo.url=submodule/git repo.path=/home/john/src/cgit/.git/modules/git where the "repo.url" value is simply "submodule/${sm_path}". Because this "module-link" only gets the path at which the submodule is installed in the parent repository, I think this is hard to use in a generic way. > If both module-link and repo.module-link are present, would > repo.module-link override the global module-link? Yes. [0] https://github.com/johnkeeping/git-instacgit > -----Original Message----- > From: John Keeping [mailto:john at keeping.me.uk] > Sent: Thursday, March 05, 2015 12:26 PM > To: Dunnigan, Terrence J > Cc: cgit at lists.zx2c4.com > Subject: Re: Support for submodules in tree view? > > On Thu, Mar 05, 2015 at 06:19:31PM +0000, Dunnigan, Terrence J wrote: > > We are using cgit 0.10.1. Some of our repos have submodules, and when > > I look at a tree view I see the name of the submodule with its current > > hash, e.g. > > > > m--------- Utilities @ 350bc94 > > > > The submodule names are all hyperlinks, but the actual link is just a > > "#". So clicking on it doesn't do anything. > > > > Is this the correct behavior? Or something on my system improperly > > configured to support submodules? > > You probably need to set the "module-link" configuration variable in your cgitrc file. > > Since it's possible for submodules to link to a different server, there isn't really much CGit can do in the general case. Note that there's also "repo.module-link." in case your submodule paths don't match up to their URLs, although I'm quite surprised we don't support a filter to map submodule URLs to links - something to go on the TODO list perhaps... > _______________________________________________ > CGit mailing list > CGit at lists.zx2c4.com > http://lists.zx2c4.com/mailman/listinfo/cgit