{"thread":{"id":"11178","subject":"[RFC] Configurable name(s) for .gitmodules","startedAt":"2007-12-07T16:00:12Z","lastAt":"2007-12-10T17:35:37Z","messageCount":5,"participants":["Ping Yin","Sven Verdoolaege"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"62291","messageId":"46dff0320712070800j6dd83714j265b3f7b291b855c@mail.gmail.com","threadId":"11178","inReplyTo":null,"subject":"[RFC] Configurable name(s) for .gitmodules","fromName":"Ping Yin","fromEmail":"pkufranky@gmail.com","sentAt":"2007-12-07T16:00:12Z","receivedAt":"2007-12-07T16:00:12Z","isPatch":false,"sender":{"key":"pkufranky@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5346?v=4"},"body":"I have a super project with many submodules. Each kind of role may\ncheck out different set of submodules. There are some common modules\nwhich are almost checked out by every role.\n\nHere comes my question: how to implement this elegantly? If all\nsubmodules are put in the same .gitmodules, every role has to in the\ncommand line manually designate all submodules to be checked out.\nHowever, it's hard to remember which submodules is required by which\nrole, not to mention the so huge .gitmodules. Maybe a script for each\nrole can help, but it's a little ugly.\n\nIf the name for '.gitmodules' is configurable, we can check in\nmodules.roleA and modules.roleB, etc. Then role A can designate the\ncorresponding modules.roleA as .gitmodules. Furtherly, if mutiple\nnames are allowed,  for common modules, we can have modules.common and\nthen submodule.defaultnames=\"modules.common, modules.roleA\"  to avoid\nduplicated module name entires in both modules.roleA and\nmodules.roleB.\n\nI have gone deeply into git-submodule.sh and see\n\"GIT_CONFIG=.gitmodules\" is used. However, configuable multiple names\ncan't be implemented in this way.\n\nRecap:\n1. configurable name for '.gitmodules'\n2. better to allow mutiple names\n3. the implementation issue for mutiple names\n\n-- \nPing Yin\n"},{"id":"62590","messageId":"46dff0320712100820yb41cbc6q5b36143bc6b6d47f@mail.gmail.com","threadId":"11178","inReplyTo":"46dff0320712070800j6dd83714j265b3f7b291b855c@mail.gmail.com","subject":"Re: [RFC] Configurable name(s) for .gitmodules","fromName":"Ping Yin","fromEmail":"pkufranky@gmail.com","sentAt":"2007-12-10T16:20:51Z","receivedAt":"2007-12-10T16:20:51Z","isPatch":false,"sender":{"key":"pkufranky@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5346?v=4"},"body":"On Dec 8, 2007 12:00 AM, Ping Yin <pkufranky@gmail.com> wrote:\n> I have a super project with many submodules. Each kind of role may\n> check out different set of submodules. There are some common modules\n> which are almost checked out by every role.\n>\n> Here comes my question: how to implement this elegantly? If all\n> submodules are put in the same .gitmodules, every role has to in the\n> command line manually designate all submodules to be checked out.\n> However, it's hard to remember which submodules is required by which\n> role, not to mention the so huge .gitmodules. Maybe a script for each\n> role can help, but it's a little ugly.\n>\n> If the name for '.gitmodules' is configurable, we can check in\n> modules.roleA and modules.roleB, etc. Then role A can designate the\n> corresponding modules.roleA as .gitmodules. Furtherly, if mutiple\n> names are allowed,  for common modules, we can have modules.common and\n> then submodule.defaultnames=\"modules.common, modules.roleA\"  to avoid\n> duplicated module name entires in both modules.roleA and\n> modules.roleB.\n>\n> I have gone deeply into git-submodule.sh and see\n> \"GIT_CONFIG=.gitmodules\" is used. However, configuable multiple names\n> can't be implemented in this way.\n>\n> Recap:\n> 1. configurable name for '.gitmodules'\n> 2. better to allow mutiple names\n> 3. the implementation issue for mutiple names\n>\n\nCan anyone give me some suggestion? Does it make sense to make\nGIT_CONFIG record multiple config files, such as\n\"GIT_CONFIG=modules.roleA:modules.roleB\"? Or any better way?\n\n> --\n> Ping Yin\n>\n\n\n\n-- \nPing Yin\n"},{"id":"62597","messageId":"20071210165436.GG3490MdfPADPa@greensroom.kotnet.org","threadId":"11178","inReplyTo":"46dff0320712070800j6dd83714j265b3f7b291b855c@mail.gmail.com","subject":"Re: [RFC] Configurable name(s) for .gitmodules","fromName":"Sven Verdoolaege","fromEmail":"skimo@kotnet.org","sentAt":"2007-12-10T16:54:36Z","receivedAt":"2007-12-10T16:54:36Z","isPatch":false,"sender":{"key":"skimo@kotnet.org","avatar":null},"body":"On Sat, Dec 08, 2007 at 12:00:12AM +0800, Ping Yin wrote:\n> I have a super project with many submodules. Each kind of role may\n> check out different set of submodules. There are some common modules\n> which are almost checked out by every role.\n> \n> Here comes my question: how to implement this elegantly? If all\n> submodules are put in the same .gitmodules, every role has to in the\n> command line manually designate all submodules to be checked out.\n\nYou could have submodules (roles in your case) containing\nother submodules, as proposed in the thread that ends in\nhttp://thread.gmane.org/gmane.comp.version-control.git/48643/focus=48939\n\nskimo\n"},{"id":"62601","messageId":"46dff0320712100934o86af6femaaf563cf40295333@mail.gmail.com","threadId":"11178","inReplyTo":"20071210165200.GF3490MdfPADPa@greensroom.kotnet.org","subject":"Re: [RFC] Configurable name(s) for .gitmodules","fromName":"Ping Yin","fromEmail":"pkufranky@gmail.com","sentAt":"2007-12-10T17:34:02Z","receivedAt":"2007-12-10T17:34:02Z","isPatch":false,"sender":{"key":"pkufranky@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5346?v=4"},"body":"On Dec 11, 2007 12:52 AM, Sven Verdoolaege <skimo@kotnet.org> wrote:\n> On Sat, Dec 08, 2007 at 12:00:12AM +0800, Ping Yin wrote:\n> > I have a super project with many submodules. Each kind of role may\n> > check out different set of submodules. There are some common modules\n> > which are almost checked out by every role.\n> >\n> > Here comes my question: how to implement this elegantly? If all\n> > submodules are put in the same .gitmodules, every role has to in the\n> > command line manually designate all submodules to be checked out.\n>\n> You could have submodules (roles in your case) containing\n> other submodules, as proposed in the thread that ends in\n> http://thread.gmane.org/gmane.comp.version-control.git/48643/focus=48939\n>\n> skimo\n>\n\nThanks for the suggestion. Linus's idea is what i want. As linus said,\none level of indirect will give much more flexibility. It's wonderful\nto put something like following to .gitmodules.\n\t[module \"infrastructure\"]\n\t\tsubmodule = lib\n\t\tsubmodule = build\n\n\t[submodule \"lib\"]\n\t\turl = git://xyzzy/lib-1.2.3\n\n\t[submodule \"build\"]\n\t\turl = git://xyzzy/build-0.61\n\nAlso I  found Lars's following reply,  i still don't understand quite\nwell why this idea is not accepted.\n\n> The reason I wanted to use\n>\n> [path \"lib\"]\n>   submodule=xyzzylib\n>   url=git://xyzzy/lib-1.2.3\n>\n> is that the git-submodule command always starts out with the submodule\n> path, trying to map that to an url or a submodule name. My proposal\n> allows\n>\n>   $ name=$(GIT_CONFIG=.gitmodules git-config path.\"$path\".submodule)\n>   $ url=$(GIT_CONFIG=.gitmodules git-config path.\"$path\".url)\n>\n\n\n-- \nPing Yin\n"},{"id":"62602","messageId":"46dff0320712100935v2634fa7ajdc1af191debc9d59@mail.gmail.com","threadId":"11178","inReplyTo":"46dff0320712100934o86af6femaaf563cf40295333@mail.gmail.com","subject":"Re: [RFC] Configurable name(s) for .gitmodules","fromName":"Ping Yin","fromEmail":"pkufranky@gmail.com","sentAt":"2007-12-10T17:35:37Z","receivedAt":"2007-12-10T17:35:37Z","isPatch":false,"sender":{"key":"pkufranky@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5346?v=4"},"body":"On Dec 11, 2007 1:34 AM, Ping Yin <pkufranky@gmail.com> wrote:\n>\n\n> Also I  found Lars's following reply,  i still don't understand quite\n> well why this idea is not accepted.\n\nSorry for the typo. It's 'Although', not 'Also'\n\n>\n>\n> --\n> Ping Yin\n>\n\n\n\n-- \nPing Yin\n"}]}