* Gitweb and submodules @ 2007-07-27 11:22 Jakub Narebski 2007-07-27 12:32 ` Sven Verdoolaege 2007-07-27 14:31 ` Lars Hjemli 0 siblings, 2 replies; 9+ messages in thread From: Jakub Narebski @ 2007-07-27 11:22 UTC (permalink / raw) To: git I'd like to add submodule support to gitweb, among others marking submodules as such in the 'tree' view and adding 'log' view link to them. But for that I need a question answered: how to find GIT_DIR of repository which contains submodule objects? We have to assume in gitweb that repositories are bare... -- Jakub Narebski Poland ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Gitweb and submodules 2007-07-27 11:22 Gitweb and submodules Jakub Narebski @ 2007-07-27 12:32 ` Sven Verdoolaege 2007-07-28 10:29 ` Jakub Narebski 2007-07-27 14:31 ` Lars Hjemli 1 sibling, 1 reply; 9+ messages in thread From: Sven Verdoolaege @ 2007-07-27 12:32 UTC (permalink / raw) To: Jakub Narebski; +Cc: git On Fri, Jul 27, 2007 at 01:22:49PM +0200, Jakub Narebski wrote: > But for that I need a question answered: how to find GIT_DIR of > repository which contains submodule objects? We have to assume in > gitweb that repositories are bare... You'll have to add a configuration variable for that. The submodule may not even be on the same server. skimo ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Gitweb and submodules 2007-07-27 12:32 ` Sven Verdoolaege @ 2007-07-28 10:29 ` Jakub Narebski 2007-07-28 10:40 ` Sven Verdoolaege 0 siblings, 1 reply; 9+ messages in thread From: Jakub Narebski @ 2007-07-28 10:29 UTC (permalink / raw) To: Sven Verdoolaege; +Cc: git On Fri, 27 July 2007, Sven Verdoolaege wrote > On Fri, Jul 27, 2007 at 01:22:49PM +0200, Jakub Narebski wrote: > > But for that I need a question answered: how to find GIT_DIR of > > repository which contains submodule objects? We have to assume in > > gitweb that repositories are bare... > > You'll have to add a configuration variable for that. > The submodule may not even be on the same server. What do you think about using "submodule.$name.gitdir" configuration variable for that? It has to be configuration variable because the location of repository which has submodule objects doesn't change when checking out (or rewinding) to different commit in supermodule. As a special case I'd use 'no value' to note that submodule objects are contained in the supermodule repository. -- Jakub Narebski Poland ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Gitweb and submodules 2007-07-28 10:29 ` Jakub Narebski @ 2007-07-28 10:40 ` Sven Verdoolaege 2007-07-28 20:39 ` Jakub Narebski 0 siblings, 1 reply; 9+ messages in thread From: Sven Verdoolaege @ 2007-07-28 10:40 UTC (permalink / raw) To: Jakub Narebski; +Cc: git On Sat, Jul 28, 2007 at 12:29:16PM +0200, Jakub Narebski wrote: > What do you think about using "submodule.$name.gitdir" configuration > variable for that? What will be the value? A path relative to the gitdir of the superproject? > It has to be configuration variable because the > location of repository which has submodule objects doesn't change when > checking out (or rewinding) to different commit in supermodule. Let's hope Pasky provides a way to set this information... > As a special case I'd use 'no value' to note that submodule objects are > contained in the supermodule repository. How about using '.' for that and no value for submodules that are not available on this server? skimo ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Gitweb and submodules 2007-07-28 10:40 ` Sven Verdoolaege @ 2007-07-28 20:39 ` Jakub Narebski 2007-07-29 16:37 ` Sven Verdoolaege 0 siblings, 1 reply; 9+ messages in thread From: Jakub Narebski @ 2007-07-28 20:39 UTC (permalink / raw) To: Sven Verdoolaege; +Cc: git On Sat, 28 July 2007, Sven Verdoolaege wrote: > On Sat, Jul 28, 2007 at 12:29:16PM +0200, Jakub Narebski wrote: >> >> What do you think about using "submodule.$name.gitdir" configuration >> variable for that? > > What will be the value? A path relative to the gitdir of the superproject? Or absolute path. I was thinking about absolute path, but path relative to GIT_DIR of superproject is a good idea. >> It has to be configuration variable because the >> location of repository which has submodule objects doesn't change when >> checking out (or rewinding) to different commit in supermodule. > > Let's hope Pasky provides a way to set this information... Why Pasky? >> As a special case I'd use 'no value' to note that submodule objects are >> contained in the supermodule repository. > > How about using '.' for that and no value for submodules that > are not available on this server? Very good idea, both using '.' to mark that submodule objects are in the superproject objects database, and no value for not available (although I'm less sure about the latter). I am thinking about the following sequence to search for submodule objects: >From $GIT_DIR/config: submodule.$name.objects (absolute or relative to gitdir of superproject) submodule.$name.gitdir (absolute or relative to gitdir of superproject) submodule.$name.url (to find GIT_DIR, if it is local filesystem URL) If there is working directory, from .gitmodules file in top level of working directory: submodule.$name.path/.git (relative to toplevel of working directory) What do you think about this? -- Jakub Narebski Poland ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Gitweb and submodules 2007-07-28 20:39 ` Jakub Narebski @ 2007-07-29 16:37 ` Sven Verdoolaege 2007-07-30 0:09 ` Jakub Narebski 0 siblings, 1 reply; 9+ messages in thread From: Sven Verdoolaege @ 2007-07-29 16:37 UTC (permalink / raw) To: Jakub Narebski; +Cc: git On Sat, Jul 28, 2007 at 10:39:28PM +0200, Jakub Narebski wrote: > On Sat, 28 July 2007, Sven Verdoolaege wrote: > > On Sat, Jul 28, 2007 at 12:29:16PM +0200, Jakub Narebski wrote: > >> It has to be configuration variable because the > >> location of repository which has submodule objects doesn't change when > >> checking out (or rewinding) to different commit in supermodule. > > > > Let's hope Pasky provides a way to set this information... > > Why Pasky? I was thinking about projects on repo.or.cz. We'd want to have a way to specify the locations of submodules. > I am thinking about the following sequence to search for submodule > objects: > > From $GIT_DIR/config: > submodule.$name.objects (absolute or relative to gitdir of superproject) > submodule.$name.gitdir (absolute or relative to gitdir of superproject) Do we really need both of these? > submodule.$name.url (to find GIT_DIR, if it is local filesystem URL) > > If there is working directory, from .gitmodules file in top level > of working directory: > submodule.$name.path/.git (relative to toplevel of working directory) Having a relative path for the URL in .gitmodules in a public repo doesn't seem very useful to me. I know it's only meant as a default value, but if it is a relative path, then it won't work for anyone cloning the superproject. skimo ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Gitweb and submodules 2007-07-29 16:37 ` Sven Verdoolaege @ 2007-07-30 0:09 ` Jakub Narebski 2007-07-30 7:06 ` Sven Verdoolaege 0 siblings, 1 reply; 9+ messages in thread From: Jakub Narebski @ 2007-07-30 0:09 UTC (permalink / raw) To: Sven Verdoolaege; +Cc: git On Sun,29 July 2007, Sven Verdoolaege wrote: > On Sat, Jul 28, 2007 at 10:39:28PM +0200, Jakub Narebski wrote: >> On Sat, 28 July 2007, Sven Verdoolaege wrote: >>> On Sat, Jul 28, 2007 at 12:29:16PM +0200, Jakub Narebski wrote: >> I am thinking about the following sequence to search for submodule >> objects: >> >> From $GIT_DIR/config: >> submodule.$name.objects (absolute or relative to gitdir of superproject) >> submodule.$name.gitdir (absolute or relative to gitdir of superproject) > > Do we really need both of these? We need only location of object database for projects. The submodule does not need full GIT_DIR structure, with refs, config, etc. So no, I'm not sure if we want both. They are equivalent to setting GIT_OBJECT_DIRECTORY and GIT_DIR for submodule, respectively. >> submodule.$name.url (to find GIT_DIR, if it is local filesystem URL) >> >> If there is working directory, from .gitmodules file in top level >> of working directory: Or the .git/config of superproject. >> submodule.$name.path/.git (relative to toplevel of working directory) > > Having a relative path for the URL in .gitmodules in a public repo > doesn't seem very useful to me. I know it's only meant as a default > value, but if it is a relative path, then it won't work for > anyone cloning the superproject. Erm, it should be relative path in .git/config (as in example in the t/t7400-submodule-basic.sh IIRC). And this is purely local matter. -- Jakub Narebski Poland ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Gitweb and submodules 2007-07-30 0:09 ` Jakub Narebski @ 2007-07-30 7:06 ` Sven Verdoolaege 0 siblings, 0 replies; 9+ messages in thread From: Sven Verdoolaege @ 2007-07-30 7:06 UTC (permalink / raw) To: Jakub Narebski; +Cc: git On Mon, Jul 30, 2007 at 02:09:03AM +0200, Jakub Narebski wrote: > On Sun,29 July 2007, Sven Verdoolaege wrote: > > On Sat, Jul 28, 2007 at 10:39:28PM +0200, Jakub Narebski wrote: > >> submodule.$name.path/.git (relative to toplevel of working directory) > > > > Having a relative path for the URL in .gitmodules in a public repo > > doesn't seem very useful to me. I know it's only meant as a default > > value, but if it is a relative path, then it won't work for > > anyone cloning the superproject. > > Erm, it should be relative path in .git/config (as in example in the > t/t7400-submodule-basic.sh IIRC). And this is purely local matter. My mistake. I misread that as submodule.$name.url. skimo ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Gitweb and submodules 2007-07-27 11:22 Gitweb and submodules Jakub Narebski 2007-07-27 12:32 ` Sven Verdoolaege @ 2007-07-27 14:31 ` Lars Hjemli 1 sibling, 0 replies; 9+ messages in thread From: Lars Hjemli @ 2007-07-27 14:31 UTC (permalink / raw) To: Jakub Narebski; +Cc: git On 7/27/07, Jakub Narebski <jnareb@gmail.com> wrote: > I'd like to add submodule support to gitweb, among others marking > submodules as such in the 'tree' view and adding 'log' view link to > them. A bit of advertising: http://hjemli.net/git/cgit/tree The implementation can be found here: http://hjemli.net/git/cgit/tree/ui-tree.c#81 > But for that I need a question answered: how to find GIT_DIR of > repository which contains submodule objects? Generally, you can't. But if you just want to show the log of the submodule path, you probably don't need to do anything at all (except the special handling in 'tree' view). If you do want to show the log of the referenced repository, I guess a new entry in .gitmodules could be helpful. -- larsh ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2007-07-30 7:06 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2007-07-27 11:22 Gitweb and submodules Jakub Narebski 2007-07-27 12:32 ` Sven Verdoolaege 2007-07-28 10:29 ` Jakub Narebski 2007-07-28 10:40 ` Sven Verdoolaege 2007-07-28 20:39 ` Jakub Narebski 2007-07-29 16:37 ` Sven Verdoolaege 2007-07-30 0:09 ` Jakub Narebski 2007-07-30 7:06 ` Sven Verdoolaege 2007-07-27 14:31 ` Lars Hjemli
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).