{"thread":{"id":"41874","subject":"[BUG] `git submodule update --init --recursive` stores gitdir in full path into `.git` of nested submodules","startedAt":"2016-03-30T09:03:25Z","lastAt":"2016-03-30T20:54:48Z","messageCount":4,"participants":["Norio Nomura","Stefan Beller","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"282203","messageId":"F89ED33B-E33D-4693-8559-4255727B78B8@gmail.com","threadId":"41874","inReplyTo":null,"subject":"[BUG] `git submodule update --init --recursive` stores gitdir in full path into `.git` of nested submodules","fromName":"Norio Nomura","fromEmail":"norio.nomura@gmail.com","sentAt":"2016-03-30T09:03:25Z","receivedAt":"2016-03-30T09:03:25Z","isPatch":false,"sender":{"key":"norio.nomura@gmail.com","avatar":null},"body":"Hi,\n\n`git submodule update --init --recursive` stores `gitdir` in full path into `.git` of nested submodules.\nSo, working directory is not portable to another directory.\n\nOn following example, `Carthage/Checkouts/Quick/Externals/Nimble/` is nested submodule and `Carthage/Checkouts/Quick/Externals/Nimble/.git` contains full path.\nhttps://gist.github.com/norio-nomura/17ce4bdf0151185e77d9b1fcfb5a469d\n\nThanks,\n--\nNorio Nomura @norio_nomura\n"},{"id":"282233","messageId":"CAGZ79kaa2uBmRZ_OPG9hVkrc29uj8Lx9b-6fgbcDNE0OGvJ+cg@mail.gmail.com","threadId":"41874","inReplyTo":"F89ED33B-E33D-4693-8559-4255727B78B8@gmail.com","subject":"Re: [BUG] `git submodule update --init --recursive` stores gitdir in full path into `.git` of nested submodules","fromName":"Stefan Beller","fromEmail":"sbeller@google.com","sentAt":"2016-03-30T16:05:05Z","receivedAt":"2016-03-30T16:05:05Z","isPatch":false,"sender":{"key":"stefanbeller@gmail.com","avatar":"https://avatars.githubusercontent.com/u/455868?v=4"},"body":"On Wed, Mar 30, 2016 at 2:03 AM, Norio Nomura <norio.nomura@gmail.com> wrote:\n> Hi,\n>\n> `git submodule update --init --recursive` stores `gitdir` in full path into `.git` of nested submodules.\n> So, working directory is not portable to another directory.\n\nAre you reporting a regression bug? (Is that a new thing or has it\nalways been that way and you just discover that it is unfortunate?)\nWhich versions did you test with?\n\n>\n> On following example, `Carthage/Checkouts/Quick/Externals/Nimble/` is nested submodule and `Carthage/Checkouts/Quick/Externals/Nimble/.git` contains full path.\n> https://gist.github.com/norio-nomura/17ce4bdf0151185e77d9b1fcfb5a469d\n>\n> Thanks,\n> --\n> Norio Nomura @norio_nomura\n>\n> --\n> To unsubscribe from this list: send the line \"unsubscribe git\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n"},{"id":"282248","messageId":"CAGZ79kZwSFjADYYC=FBFr8cWv08mv+H7E=Bx3N=J2Q_o8sK9qw@mail.gmail.com","threadId":"41874","inReplyTo":"CAGZ79kaa2uBmRZ_OPG9hVkrc29uj8Lx9b-6fgbcDNE0OGvJ+cg@mail.gmail.com","subject":"Re: [BUG] `git submodule update --init --recursive` stores gitdir in full path into `.git` of nested submodules","fromName":"Stefan Beller","fromEmail":"sbeller@google.com","sentAt":"2016-03-30T17:24:25Z","receivedAt":"2016-03-30T17:24:25Z","isPatch":false,"sender":{"key":"stefanbeller@gmail.com","avatar":"https://avatars.githubusercontent.com/u/455868?v=4"},"body":"On Wed, Mar 30, 2016 at 9:05 AM, Stefan Beller <sbeller@google.com> wrote:\n> On Wed, Mar 30, 2016 at 2:03 AM, Norio Nomura <norio.nomura@gmail.com> wrote:\n>> Hi,\n>>\n>> `git submodule update --init --recursive` stores `gitdir` in full path into `.git` of nested submodules.\n>> So, working directory is not portable to another directory.\n>\n> Are you reporting a regression bug? (Is that a new thing or has it\n> always been that way and you just discover that it is unfortunate?)\n> Which versions did you test with?\n\n➜  15:34:32 git:(master) git --version\ngit version 2.8.0\n\nat the end of your gist.\nThe same happens when using 2.7.4, it doesn't happen when using 2.6.6 though.\n\nIt turns out ee8838d (2015-09-08, submodule: rewrite `module_clone`\nshell function in C)\nbroke it.\n\nI'll look into fixing it.\n\nThanks,\nStefan\n\n\n>\n>>\n>> On following example, `Carthage/Checkouts/Quick/Externals/Nimble/` is nested submodule and `Carthage/Checkouts/Quick/Externals/Nimble/.git` contains full path.\n>> https://gist.github.com/norio-nomura/17ce4bdf0151185e77d9b1fcfb5a469d\n>>\n>> Thanks,\n>> --\n>> Norio Nomura @norio_nomura\n>>\n>> --\n>> To unsubscribe from this list: send the line \"unsubscribe git\" in\n>> the body of a message to majordomo@vger.kernel.org\n>> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n"},{"id":"282269","messageId":"xmqqpoubsn3b.fsf@gitster.mtv.corp.google.com","threadId":"41874","inReplyTo":"CAGZ79kZwSFjADYYC=FBFr8cWv08mv+H7E=Bx3N=J2Q_o8sK9qw@mail.gmail.com","subject":"Re: [BUG] `git submodule update --init --recursive` stores gitdir in full path into `.git` of nested submodules","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2016-03-30T20:54:48Z","receivedAt":"2016-03-30T20:54:48Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Stefan Beller <sbeller@google.com> writes:\n\n> On Wed, Mar 30, 2016 at 9:05 AM, Stefan Beller <sbeller@google.com> wrote:\n>> On Wed, Mar 30, 2016 at 2:03 AM, Norio Nomura <norio.nomura@gmail.com> wrote:\n>>> Hi,\n>>>\n>>> `git submodule update --init --recursive` stores `gitdir` in full path into `.git` of nested submodules.\n>>> So, working directory is not portable to another directory.\n>>\n>> Are you reporting a regression bug? (Is that a new thing or has it\n>> always been that way and you just discover that it is unfortunate?)\n>> Which versions did you test with?\n>\n> ➜  15:34:32 git:(master) git --version\n> git version 2.8.0\n>\n> at the end of your gist.\n> The same happens when using 2.7.4, it doesn't happen when using 2.6.6 though.\n>\n> It turns out ee8838d (2015-09-08, submodule: rewrite `module_clone`\n> shell function in C)\n> broke it.\n>\n> I'll look into fixing it.\n\nThanks.\n\nThis may be an unrelated tangent, but somewhere in \"submodule init\"\ncodepath seem to turn paths into absolute too aggressively.  Merging\nyour recent \"path related fix\" to 'pu' seems to break some test by\nshowing absolute paths when the test expects to see relative ones.\n"}]}