{"thread":{"id":"30590","subject":"Question about submodules and absolute paths","startedAt":"2012-05-22T11:36:45Z","lastAt":"2012-05-24T05:08:16Z","messageCount":14,"participants":["Alexey Pelykh","Junio C Hamano","Matt Seitz (matseitz)","Johannes Sixt","Jens Lehmann"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"191891","messageId":"CAOmKuSpqFrC7G4DbZu=uYDwvU6QqrJUi2aNBnSjy7_PXMMJpjQ@mail.gmail.com","threadId":"30590","inReplyTo":"CAOmKuSoYP9fYORDy5twLpFh7SQ7rc6x2A=F8XjfKMqo-ErCauQ@mail.gmail.com","subject":"Question about submodules and absolute paths","fromName":"Alexey Pelykh","fromEmail":"alexey.pelykh@gmail.com","sentAt":"2012-05-22T11:36:45Z","receivedAt":"2012-05-22T11:36:45Z","isPatch":false,"sender":{"key":"alexey.pelykh@gmail.com","avatar":"https://gravatar.com/avatar/cea5ae66285e0b62a4323ffe6b2d7a98cb74eaf765c06ce5e416a237e66e4f9f?d=mp&s=160"},"body":"Hello,\n\nIs it possible to avoid usage of absolute paths in information about\nsubmodule? I'm working with same local repository from both Windows and\nLinux. But unfortunately absolute paths in modules break all the sweetness,\nsince these paths differ from OS to OS and thus I have to keep two clones of\neach repository.\nRegarding absolute paths I refer to are:\n\nIn ${REPO}/.git/modules/${MODULE_RELATIVE_PATH}/config file:\n[core]\n   worktree =  ${FULL_REPO_PATH}/${MODULE_RELATIVE_PATH}\n\nIn ${REPO}/${MODULE_RELATIVE_PATH}/.git file:\ngitdir: ${FULL_REPO_PATH}/.git/modules/${MODULE_RELATIVE_PATH}\n\nThanks,\nAlexey\n"},{"id":"191919","messageId":"7vk4043wc5.fsf@alter.siamese.dyndns.org","threadId":"30590","inReplyTo":"CAOmKuSpqFrC7G4DbZu=uYDwvU6QqrJUi2aNBnSjy7_PXMMJpjQ@mail.gmail.com","subject":"Re: Question about submodules and absolute paths","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-05-22T18:27:22Z","receivedAt":"2012-05-22T18:27:22Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Alexey Pelykh <alexey.pelykh@gmail.com> writes:\n\n> since these paths differ from OS to OS and thus I have to keep two clones of\n> each repository.\n\nI am not sure what \"absolute path\" has with this.  If you are working on\ntwo machines, don't you need two clones, one for each, anyway?\n"},{"id":"191925","messageId":"CAOmKuSrmxnHKaip2X87Y0Cp=XtLAtpAwUp71QhZ5od3gbDF2sg@mail.gmail.com","threadId":"30590","inReplyTo":"7vk4043wc5.fsf@alter.siamese.dyndns.org","subject":"Re: Question about submodules and absolute paths","fromName":"Alexey Pelykh","fromEmail":"alexey.pelykh@gmail.com","sentAt":"2012-05-22T19:18:16Z","receivedAt":"2012-05-22T19:18:16Z","isPatch":false,"sender":{"key":"alexey.pelykh@gmail.com","avatar":"https://gravatar.com/avatar/cea5ae66285e0b62a4323ffe6b2d7a98cb74eaf765c06ce5e416a237e66e4f9f?d=mp&s=160"},"body":"Not on two machines, on single machine but with two OSes\nWindows + Linux + shared 'work' partition :) So both Windows and Linux\nuse same repo clone that is stored on a 'work' partition. But due to\nthose absolute paths, it gives '/cygdrive/d/work' on windows and\n'/media/work' on linux. Thus I have to keep 2 copies of each\nrepository that uses submodules (and that is very inconvenient :( )\n\nOn Tue, May 22, 2012 at 9:27 PM, Junio C Hamano <gitster@pobox.com> wrote:\n> Alexey Pelykh <alexey.pelykh@gmail.com> writes:\n>\n>> since these paths differ from OS to OS and thus I have to keep two clones of\n>> each repository.\n>\n> I am not sure what \"absolute path\" has with this.  If you are working on\n> two machines, don't you need two clones, one for each, anyway?\n"},{"id":"191927","messageId":"70952A932255A2489522275A628B97C31348C70D@xmb-sjc-233.amer.cisco.com","threadId":"30590","inReplyTo":"CAOmKuSrmxnHKaip2X87Y0Cp=XtLAtpAwUp71QhZ5od3gbDF2sg@mail.gmail.com","subject":"RE: Question about submodules and absolute paths","fromName":"Matt Seitz (matseitz)","fromEmail":"matseitz@cisco.com","sentAt":"2012-05-22T19:25:28Z","receivedAt":"2012-05-22T19:25:28Z","isPatch":false,"sender":{"key":"matseitz@cisco.com","avatar":null},"body":"> From: git-owner@vger.kernel.org [mailto:git-owner@vger.kernel.org] On\n> Behalf Of Alexey Pelykh\n> \n> Not on two machines, on single machine but with two OSes Windows +\nLinux +\n> shared 'work' partition :) So both Windows and Linux use same repo\nclone\n> that is stored on a 'work' partition. But due to those absolute paths,\nit\n> gives '/cygdrive/d/work' on windows and '/media/work' on linux. Thus I\n> have to keep 2 copies of each repository that uses submodules (and\nthat is\n> very inconvenient :( )\n\nAs a workaround, how about using Cygwin's mount table to mount \"/media\"\nto \"d:/\", or \"/media/work\" to \"d:/work\"?\n\nSee:\nhttp://cygwin.com/cygwin-ug-net/using.html#mount-table\n"},{"id":"191928","messageId":"CAOmKuSqRHMS+hvCXL4Ok6ReTPW-3xT9SunGeibjCCCgVk9SU6Q@mail.gmail.com","threadId":"30590","inReplyTo":"70952A932255A2489522275A628B97C31348C70D@xmb-sjc-233.amer.cisco.com","subject":"Re: Question about submodules and absolute paths","fromName":"Alexey Pelykh","fromEmail":"alexey.pelykh@gmail.com","sentAt":"2012-05-22T19:29:07Z","receivedAt":"2012-05-22T19:29:07Z","isPatch":false,"sender":{"key":"alexey.pelykh@gmail.com","avatar":"https://gravatar.com/avatar/cea5ae66285e0b62a4323ffe6b2d7a98cb74eaf765c06ce5e416a237e66e4f9f?d=mp&s=160"},"body":"Thanks, Matt.\n\nIndeed this is a workaround, what I was thinking about to use. The\nthing I wanted actually to discuss whether it worth to research\npossibility of replacing these absolute paths with relative ones. At\nleast afaik, git repo clone is fully portable (movable) except for\nsubmodules. So I wanted to ask community if this is an intended\nbehavior, or it may (and should?) be refined.\n\nBest regards,\nAlexey\n\nOn Tue, May 22, 2012 at 10:25 PM, Matt Seitz (matseitz)\n<matseitz@cisco.com> wrote:\n>> From: git-owner@vger.kernel.org [mailto:git-owner@vger.kernel.org] On\n>> Behalf Of Alexey Pelykh\n>>\n>> Not on two machines, on single machine but with two OSes Windows +\n> Linux +\n>> shared 'work' partition :) So both Windows and Linux use same repo\n> clone\n>> that is stored on a 'work' partition. But due to those absolute paths,\n> it\n>> gives '/cygdrive/d/work' on windows and '/media/work' on linux. Thus I\n>> have to keep 2 copies of each repository that uses submodules (and\n> that is\n>> very inconvenient :( )\n>\n> As a workaround, how about using Cygwin's mount table to mount \"/media\"\n> to \"d:/\", or \"/media/work\" to \"d:/work\"?\n>\n> See:\n> http://cygwin.com/cygwin-ug-net/using.html#mount-table\n>\n"},{"id":"191930","messageId":"70952A932255A2489522275A628B97C31348C71F@xmb-sjc-233.amer.cisco.com","threadId":"30590","inReplyTo":"CAOmKuSqRHMS+hvCXL4Ok6ReTPW-3xT9SunGeibjCCCgVk9SU6Q@mail.gmail.com","subject":"RE: Question about submodules and absolute paths","fromName":"Matt Seitz (matseitz)","fromEmail":"matseitz@cisco.com","sentAt":"2012-05-22T19:36:29Z","receivedAt":"2012-05-22T19:36:29Z","isPatch":false,"sender":{"key":"matseitz@cisco.com","avatar":null},"body":"> From: Alexey Pelykh [mailto:alexey.pelykh@gmail.com]\n> \n> Indeed this is a workaround, what I was thinking about to use. The\nthing I\n> wanted actually to discuss whether it worth to research possibility of\n> replacing these absolute paths with relative ones. \n\nSure.  I just wanted to offer an immediate, interim solution until there\nis a decision on the permanent solution.\n"},{"id":"191938","messageId":"CAOmKuSoxf_mRJRyjXj99NQLoa+fD-HU_oUYPrJYPNTPmvhs46g@mail.gmail.com","threadId":"30590","inReplyTo":"70952A932255A2489522275A628B97C31348C71F@xmb-sjc-233.amer.cisco.com","subject":"Re: Question about submodules and absolute paths","fromName":"Alexey Pelykh","fromEmail":"alexey.pelykh@gmail.com","sentAt":"2012-05-22T20:25:43Z","receivedAt":"2012-05-22T20:25:43Z","isPatch":false,"sender":{"key":"alexey.pelykh@gmail.com","avatar":"https://gravatar.com/avatar/cea5ae66285e0b62a4323ffe6b2d7a98cb74eaf765c06ce5e416a237e66e4f9f?d=mp&s=160"},"body":"Getting back to the topic, who has what opinions on it?\n\nOn Tue, May 22, 2012 at 10:36 PM, Matt Seitz (matseitz)\n<matseitz@cisco.com> wrote:\n>> From: Alexey Pelykh [mailto:alexey.pelykh@gmail.com]\n>>\n>> Indeed this is a workaround, what I was thinking about to use. The\n> thing I\n>> wanted actually to discuss whether it worth to research possibility of\n>> replacing these absolute paths with relative ones.\n>\n> Sure.  I just wanted to offer an immediate, interim solution until there\n> is a decision on the permanent solution.\n>\n"},{"id":"191951","messageId":"7vpq9w2ae2.fsf@alter.siamese.dyndns.org","threadId":"30590","inReplyTo":"CAOmKuSoxf_mRJRyjXj99NQLoa+fD-HU_oUYPrJYPNTPmvhs46g@mail.gmail.com","subject":"Re: Question about submodules and absolute paths","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-05-22T21:06:45Z","receivedAt":"2012-05-22T21:06:45Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Alexey Pelykh <alexey.pelykh@gmail.com> writes:\n\n> Getting back to the topic, who has what opinions on it?\n\nYou wait ;-) I do not think our friends in certain timezones had chance to\nsee your message and think about it yet.\n\nDidn't the submodule folks worked on the related area recently, and\ndoesn't the result of their work already in v1.7.10?\n\nI am thinking specifically about the series around d75219b (submodules:\nalways use a relative path from gitdir to work tree, 2012-03-04).  Jens?\n"},{"id":"191968","messageId":"4FBC774E.5000500@viscovery.net","threadId":"30590","inReplyTo":"CAOmKuSrmxnHKaip2X87Y0Cp=XtLAtpAwUp71QhZ5od3gbDF2sg@mail.gmail.com","subject":"Re: Question about submodules and absolute paths","fromName":"Johannes Sixt","fromEmail":"j.sixt@viscovery.net","sentAt":"2012-05-23T05:36:14Z","receivedAt":"2012-05-23T05:36:14Z","isPatch":false,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Am 5/22/2012 21:18, schrieb Alexey Pelykh:\n> Not on two machines, on single machine but with two OSes\n> Windows + Linux + shared 'work' partition :) So both Windows and Linux\n> use same repo clone that is stored on a 'work' partition. But due to\n> those absolute paths, it gives '/cygdrive/d/work' on windows and\n> '/media/work' on linux. Thus I have to keep 2 copies of each\n> repository that uses submodules (and that is very inconvenient :( )\n\nI think you cannot share the index file between OSes. Even though its file\nformat should be portable, the contents (stat information) is not\nportable. After you boot into a different OS, you need at least a 'git\nstatus' call to populate the index with the stat data from the new OS.\n\n-- Hannes\n"},{"id":"191969","messageId":"CAOmKuSqeW==dfdengmOrzaTWr+uqN9ysvm8MEHS1BB8mnYUA3Q@mail.gmail.com","threadId":"30590","inReplyTo":"4FBC774E.5000500@viscovery.net","subject":"Re: Question about submodules and absolute paths","fromName":"Alexey Pelykh","fromEmail":"alexey.pelykh@gmail.com","sentAt":"2012-05-23T05:39:49Z","receivedAt":"2012-05-23T05:39:49Z","isPatch":false,"sender":{"key":"alexey.pelykh@gmail.com","avatar":"https://gravatar.com/avatar/cea5ae66285e0b62a4323ffe6b2d7a98cb74eaf765c06ce5e416a237e66e4f9f?d=mp&s=160"},"body":"Thanks for pointing this\nI haven't experienced issue with this. Maybe due to my git on Windows\nis actually part of cygwin? Or maybe git status is 99% is what I do\nbefore any operation with git :)\n\nOn Wed, May 23, 2012 at 8:36 AM, Johannes Sixt <j.sixt@viscovery.net> wrote:\n>\n> Am 5/22/2012 21:18, schrieb Alexey Pelykh:\n> > Not on two machines, on single machine but with two OSes\n> > Windows + Linux + shared 'work' partition :) So both Windows and Linux\n> > use same repo clone that is stored on a 'work' partition. But due to\n> > those absolute paths, it gives '/cygdrive/d/work' on windows and\n> > '/media/work' on linux. Thus I have to keep 2 copies of each\n> > repository that uses submodules (and that is very inconvenient :( )\n>\n> I think you cannot share the index file between OSes. Even though its file\n> format should be portable, the contents (stat information) is not\n> portable. After you boot into a different OS, you need at least a 'git\n> status' call to populate the index with the stat data from the new OS.\n>\n> -- Hannes\n"},{"id":"191970","messageId":"4FBC90C2.6050203@web.de","threadId":"30590","inReplyTo":"7vpq9w2ae2.fsf@alter.siamese.dyndns.org","subject":"Re: Question about submodules and absolute paths","fromName":"Jens Lehmann","fromEmail":"jens.lehmann@web.de","sentAt":"2012-05-23T07:24:50Z","receivedAt":"2012-05-23T07:24:50Z","isPatch":false,"sender":{"key":"jens.lehmann@web.de","avatar":"https://avatars.githubusercontent.com/u/135220?v=4"},"body":"Am 22.05.2012 23:06, schrieb Junio C Hamano:\n> Didn't the submodule folks worked on the related area recently, and\n> doesn't the result of their work already in v1.7.10?\n> \n> I am thinking specifically about the series around d75219b (submodules:\n> always use a relative path from gitdir to work tree, 2012-03-04).  Jens?\n\nYes, these changes should fix the problem described by Alexey.\n"},{"id":"191971","messageId":"CAOmKuSqUm+WoTA5U5ZSgqFS6Oc7q+y8wSR0sMxHW_EPKoz6fwQ@mail.gmail.com","threadId":"30590","inReplyTo":"4FBC90C2.6050203@web.de","subject":"Re: Question about submodules and absolute paths","fromName":"Alexey Pelykh","fromEmail":"alexey.pelykh@gmail.com","sentAt":"2012-05-23T07:32:38Z","receivedAt":"2012-05-23T07:32:38Z","isPatch":false,"sender":{"key":"alexey.pelykh@gmail.com","avatar":"https://gravatar.com/avatar/cea5ae66285e0b62a4323ffe6b2d7a98cb74eaf765c06ce5e416a237e66e4f9f?d=mp&s=160"},"body":"Great! I'll try git from sources then\n\nOn Wed, May 23, 2012 at 10:24 AM, Jens Lehmann <Jens.Lehmann@web.de> wrote:\n>\n> Am 22.05.2012 23:06, schrieb Junio C Hamano:\n> > Didn't the submodule folks worked on the related area recently, and\n> > doesn't the result of their work already in v1.7.10?\n> >\n> > I am thinking specifically about the series around d75219b (submodules:\n> > always use a relative path from gitdir to work tree, 2012-03-04).  Jens?\n>\n> Yes, these changes should fix the problem described by Alexey.\n"},{"id":"192016","messageId":"4FBD4BB7.9070704@web.de","threadId":"30590","inReplyTo":"CAOmKuSqUm+WoTA5U5ZSgqFS6Oc7q+y8wSR0sMxHW_EPKoz6fwQ@mail.gmail.com","subject":"Re: Question about submodules and absolute paths","fromName":"Jens Lehmann","fromEmail":"jens.lehmann@web.de","sentAt":"2012-05-23T20:42:31Z","receivedAt":"2012-05-23T20:42:31Z","isPatch":false,"sender":{"key":"jens.lehmann@web.de","avatar":"https://avatars.githubusercontent.com/u/135220?v=4"},"body":"[please do not top-post]\n\nAm 23.05.2012 09:32, schrieb Alexey Pelykh:\n> On Wed, May 23, 2012 at 10:24 AM, Jens Lehmann <Jens.Lehmann@web.de> wrote:\n>>\n>> Am 22.05.2012 23:06, schrieb Junio C Hamano:\n>>> Didn't the submodule folks worked on the related area recently, and\n>>> doesn't the result of their work already in v1.7.10?\n>>>\n>>> I am thinking specifically about the series around d75219b (submodules:\n>>> always use a relative path from gitdir to work tree, 2012-03-04).  Jens?\n>>\n>> Yes, these changes should fix the problem described by Alexey.\n>\n> Great! I'll try git from sources then\n\nBut don't forget to re-clone the submodules, the paths won't be updated\nfor existing submodules.\n"},{"id":"192045","messageId":"CAOmKuSoM=qP-Mpysfwpx7QDFx-hSwcBaRULfiS3b+VEhnXvVxw@mail.gmail.com","threadId":"30590","inReplyTo":"4FBD4BB7.9070704@web.de","subject":"Re: Question about submodules and absolute paths","fromName":"Alexey Pelykh","fromEmail":"alexey.pelykh@gmail.com","sentAt":"2012-05-24T05:08:16Z","receivedAt":"2012-05-24T05:08:16Z","isPatch":false,"sender":{"key":"alexey.pelykh@gmail.com","avatar":"https://gravatar.com/avatar/cea5ae66285e0b62a4323ffe6b2d7a98cb74eaf765c06ce5e416a237e66e4f9f?d=mp&s=160"},"body":"Thanks for pointing that out\n\nOn Wed, May 23, 2012 at 11:42 PM, Jens Lehmann <Jens.Lehmann@web.de> wrote:\n> [please do not top-post]\n>\n> Am 23.05.2012 09:32, schrieb Alexey Pelykh:\n>> On Wed, May 23, 2012 at 10:24 AM, Jens Lehmann <Jens.Lehmann@web.de>\n>> wrote:\n>>>\n>>> Am 22.05.2012 23:06, schrieb Junio C Hamano:\n>>>> Didn't the submodule folks worked on the related area recently, and\n>>>> doesn't the result of their work already in v1.7.10?\n>>>>\n>>>> I am thinking specifically about the series around d75219b (submodules:\n>>>> always use a relative path from gitdir to work tree, 2012-03-04).\n>>>>  Jens?\n>>>\n>>> Yes, these changes should fix the problem described by Alexey.\n>>\n>> Great! I'll try git from sources then\n>\n> But don't forget to re-clone the submodules, the paths won't be updated\n> for existing submodules.\n"}]}