{"thread":{"id":"9255","subject":"Gitweb and submodules","startedAt":"2007-07-27T11:22:49Z","lastAt":"2007-07-30T07:06:00Z","messageCount":9,"participants":["Jakub Narebski","Sven Verdoolaege","Lars Hjemli"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"48789","messageId":"200707271322.50114.jnareb@gmail.com","threadId":"9255","inReplyTo":null,"subject":"Gitweb and submodules","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2007-07-27T11:22:49Z","receivedAt":"2007-07-27T11:22:49Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"I'd like to add submodule support to gitweb, among others marking \nsubmodules as such in the 'tree' view and adding 'log' view link to \nthem.\n\nBut for that I need a question answered: how to find GIT_DIR of \nrepository which contains submodule objects? We have to assume in \ngitweb that repositories are bare...\n\n-- \nJakub Narebski\nPoland\n"},{"id":"48795","messageId":"20070727123229.GB31114MdfPADPa@greensroom.kotnet.org","threadId":"9255","inReplyTo":"200707271322.50114.jnareb@gmail.com","subject":"Re: Gitweb and submodules","fromName":"Sven Verdoolaege","fromEmail":"skimo@kotnet.org","sentAt":"2007-07-27T12:32:29Z","receivedAt":"2007-07-27T12:32:29Z","isPatch":false,"sender":{"key":"skimo@kotnet.org","avatar":null},"body":"On Fri, Jul 27, 2007 at 01:22:49PM +0200, Jakub Narebski wrote:\n> But for that I need a question answered: how to find GIT_DIR of \n> repository which contains submodule objects? We have to assume in \n> gitweb that repositories are bare...\n\nYou'll have to add a configuration variable for that.\nThe submodule may not even be on the same server.\n\nskimo\n"},{"id":"48800","messageId":"8c5c35580707270731l1fa5bd1dw94c9955d314b4ce6@mail.gmail.com","threadId":"9255","inReplyTo":"200707271322.50114.jnareb@gmail.com","subject":"Re: Gitweb and submodules","fromName":"Lars Hjemli","fromEmail":"hjemli@gmail.com","sentAt":"2007-07-27T14:31:42Z","receivedAt":"2007-07-27T14:31:42Z","isPatch":false,"sender":{"key":"hjemli@gmail.com","avatar":null},"body":"On 7/27/07, Jakub Narebski <jnareb@gmail.com> wrote:\n> I'd like to add submodule support to gitweb, among others marking\n> submodules as such in the 'tree' view and adding 'log' view link to\n> them.\n\nA bit of advertising:\n  http://hjemli.net/git/cgit/tree\n\nThe implementation can be found here:\n  http://hjemli.net/git/cgit/tree/ui-tree.c#81\n\n> But for that I need a question answered: how to find GIT_DIR of\n> repository which contains submodule objects?\n\nGenerally, you can't. But if you just want to show the log of the\nsubmodule path, you probably don't need to do anything at all (except\nthe special handling in 'tree' view). If you do want to show the log\nof the referenced repository, I guess a new entry  in .gitmodules\ncould be helpful.\n\n--\nlarsh\n"},{"id":"48893","messageId":"200707281229.17351.jnareb@gmail.com","threadId":"9255","inReplyTo":"20070727123229.GB31114MdfPADPa@greensroom.kotnet.org","subject":"Re: Gitweb and submodules","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2007-07-28T10:29:16Z","receivedAt":"2007-07-28T10:29:16Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"On Fri, 27 July 2007, Sven Verdoolaege wrote\n> On Fri, Jul 27, 2007 at 01:22:49PM +0200, Jakub Narebski wrote:\n\n> > But for that I need a question answered: how to find GIT_DIR of \n> > repository which contains submodule objects? We have to assume in \n> > gitweb that repositories are bare...\n> \n> You'll have to add a configuration variable for that.\n> The submodule may not even be on the same server.\n\nWhat do you think about using \"submodule.$name.gitdir\" configuration \nvariable for that? It has to be configuration variable because the \nlocation of repository which has submodule objects doesn't change when \nchecking out (or rewinding) to different commit in supermodule.\n\nAs a special case I'd use 'no value' to note that submodule objects are \ncontained in the supermodule repository.\n\n-- \nJakub Narebski\nPoland\n"},{"id":"48895","messageId":"20070728104054.GI31114MdfPADPa@greensroom.kotnet.org","threadId":"9255","inReplyTo":"200707281229.17351.jnareb@gmail.com","subject":"Re: Gitweb and submodules","fromName":"Sven Verdoolaege","fromEmail":"skimo@kotnet.org","sentAt":"2007-07-28T10:40:54Z","receivedAt":"2007-07-28T10:40:54Z","isPatch":false,"sender":{"key":"skimo@kotnet.org","avatar":null},"body":"On Sat, Jul 28, 2007 at 12:29:16PM +0200, Jakub Narebski wrote:\n> What do you think about using \"submodule.$name.gitdir\" configuration \n> variable for that?\n\nWhat will be the value?  A path relative to the gitdir of the superproject?\n\n> It has to be configuration variable because the \n> location of repository which has submodule objects doesn't change when \n> checking out (or rewinding) to different commit in supermodule.\n\nLet's hope Pasky provides a way to set this information...\n\n> As a special case I'd use 'no value' to note that submodule objects are \n> contained in the supermodule repository.\n\nHow about using '.' for that and no value for submodules that\nare not available on this server?\n\nskimo\n"},{"id":"48937","messageId":"200707282239.29340.jnareb@gmail.com","threadId":"9255","inReplyTo":"20070728104054.GI31114MdfPADPa@greensroom.kotnet.org","subject":"Re: Gitweb and submodules","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2007-07-28T20:39:28Z","receivedAt":"2007-07-28T20:39:28Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"On Sat, 28 July 2007, Sven Verdoolaege wrote:\n> On Sat, Jul 28, 2007 at 12:29:16PM +0200, Jakub Narebski wrote:\n>>\n>> What do you think about using \"submodule.$name.gitdir\" configuration \n>> variable for that?\n> \n> What will be the value?  A path relative to the gitdir of the superproject?\n\nOr absolute path. I was thinking about absolute path, but path\nrelative to GIT_DIR of superproject is a good idea.\n\n>> It has to be configuration variable because the \n>> location of repository which has submodule objects doesn't change when \n>> checking out (or rewinding) to different commit in supermodule.\n> \n> Let's hope Pasky provides a way to set this information...\n\nWhy Pasky?\n\n>> As a special case I'd use 'no value' to note that submodule objects are \n>> contained in the supermodule repository.\n> \n> How about using '.' for that and no value for submodules that\n> are not available on this server?\n\nVery good idea, both using '.' to mark that submodule objects are in\nthe superproject objects database, and no value for not available\n(although I'm less sure about the latter).\n\n\nI am thinking about the following sequence to search for submodule\nobjects:\n\n>From $GIT_DIR/config:\n  submodule.$name.objects (absolute or relative to gitdir of superproject)\n  submodule.$name.gitdir  (absolute or relative to gitdir of superproject)\n  submodule.$name.url     (to find GIT_DIR, if it is local filesystem URL)\n\nIf there is working directory, from .gitmodules file in top level\nof working directory:\n  submodule.$name.path/.git (relative to toplevel of working directory)\n\nWhat do you think about this?\n\n-- \nJakub Narebski\nPoland\n"},{"id":"48994","messageId":"20070729163747.GJ31114MdfPADPa@greensroom.kotnet.org","threadId":"9255","inReplyTo":"200707282239.29340.jnareb@gmail.com","subject":"Re: Gitweb and submodules","fromName":"Sven Verdoolaege","fromEmail":"skimo@kotnet.org","sentAt":"2007-07-29T16:37:47Z","receivedAt":"2007-07-29T16:37:47Z","isPatch":false,"sender":{"key":"skimo@kotnet.org","avatar":null},"body":"On Sat, Jul 28, 2007 at 10:39:28PM +0200, Jakub Narebski wrote:\n> On Sat, 28 July 2007, Sven Verdoolaege wrote:\n> > On Sat, Jul 28, 2007 at 12:29:16PM +0200, Jakub Narebski wrote:\n> >> It has to be configuration variable because the \n> >> location of repository which has submodule objects doesn't change when \n> >> checking out (or rewinding) to different commit in supermodule.\n> > \n> > Let's hope Pasky provides a way to set this information...\n> \n> Why Pasky?\n\nI was thinking about projects on repo.or.cz.\nWe'd want to have a way to specify the locations of submodules.\n\n> I am thinking about the following sequence to search for submodule\n> objects:\n> \n> From $GIT_DIR/config:\n>   submodule.$name.objects (absolute or relative to gitdir of superproject)\n>   submodule.$name.gitdir  (absolute or relative to gitdir of superproject)\n\nDo we really need both of these?\n\n>   submodule.$name.url     (to find GIT_DIR, if it is local filesystem URL)\n> \n> If there is working directory, from .gitmodules file in top level\n> of working directory:\n>   submodule.$name.path/.git (relative to toplevel of working directory)\n\nHaving a relative path for the URL in .gitmodules in a public repo\ndoesn't seem very useful to me.  I know it's only meant as a default\nvalue, but if it is a relative path, then it won't work for\nanyone cloning the superproject.\n\nskimo\n"},{"id":"49036","messageId":"200707300209.03531.jnareb@gmail.com","threadId":"9255","inReplyTo":"20070729163747.GJ31114MdfPADPa@greensroom.kotnet.org","subject":"Re: Gitweb and submodules","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2007-07-30T00:09:03Z","receivedAt":"2007-07-30T00:09:03Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"On Sun,29 July 2007, Sven Verdoolaege wrote:\n> On Sat, Jul 28, 2007 at 10:39:28PM +0200, Jakub Narebski wrote:\n>> On Sat, 28 July 2007, Sven Verdoolaege wrote:\n>>> On Sat, Jul 28, 2007 at 12:29:16PM +0200, Jakub Narebski wrote:\n \n>> I am thinking about the following sequence to search for submodule\n>> objects:\n>> \n>> From $GIT_DIR/config:\n>>   submodule.$name.objects (absolute or relative to gitdir of superproject)\n>>   submodule.$name.gitdir  (absolute or relative to gitdir of superproject)\n> \n> Do we really need both of these?\n\nWe need only location of object database for projects. The submodule\ndoes not need full GIT_DIR structure, with refs, config, etc.\n\nSo no, I'm not sure if we want both. They are equivalent to setting\nGIT_OBJECT_DIRECTORY and GIT_DIR for submodule, respectively.\n \n>>   submodule.$name.url     (to find GIT_DIR, if it is local filesystem URL)\n>> \n>> If there is working directory, from .gitmodules file in top level\n>> of working directory:\n\nOr the .git/config of superproject.\n\n>>   submodule.$name.path/.git (relative to toplevel of working directory)\n> \n> Having a relative path for the URL in .gitmodules in a public repo\n> doesn't seem very useful to me.  I know it's only meant as a default\n> value, but if it is a relative path, then it won't work for\n> anyone cloning the superproject.\n\nErm, it should be relative path in .git/config (as in example in the\nt/t7400-submodule-basic.sh IIRC). And this is purely local matter.\n\n-- \nJakub Narebski\nPoland\n"},{"id":"49067","messageId":"20070730070600.GK31114MdfPADPa@greensroom.kotnet.org","threadId":"9255","inReplyTo":"200707300209.03531.jnareb@gmail.com","subject":"Re: Gitweb and submodules","fromName":"Sven Verdoolaege","fromEmail":"skimo@kotnet.org","sentAt":"2007-07-30T07:06:00Z","receivedAt":"2007-07-30T07:06:00Z","isPatch":false,"sender":{"key":"skimo@kotnet.org","avatar":null},"body":"On Mon, Jul 30, 2007 at 02:09:03AM +0200, Jakub Narebski wrote:\n> On Sun,29 July 2007, Sven Verdoolaege wrote:\n> > On Sat, Jul 28, 2007 at 10:39:28PM +0200, Jakub Narebski wrote:\n> >>   submodule.$name.path/.git (relative to toplevel of working directory)\n> > \n> > Having a relative path for the URL in .gitmodules in a public repo\n> > doesn't seem very useful to me.  I know it's only meant as a default\n> > value, but if it is a relative path, then it won't work for\n> > anyone cloning the superproject.\n> \n> Erm, it should be relative path in .git/config (as in example in the\n> t/t7400-submodule-basic.sh IIRC). And this is purely local matter.\n\nMy mistake.  I misread that as submodule.$name.url.\n\nskimo\n"}]}