{"thread":{"id":"51850","subject":"GIT_OBJECT_DIRECTORY ignored when cloning submodules","startedAt":"2019-09-14T16:07:14Z","lastAt":"2019-09-16T18:03:34Z","messageCount":2,"participants":["Robert Schmidt-Cisternas","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"382368","messageId":"CAEq5TVWLxpc2a4fCch=DZfOgDWjKiu6gv0cfVHC3Wdy9581aSg@mail.gmail.com","threadId":"51850","inReplyTo":null,"subject":"GIT_OBJECT_DIRECTORY ignored when cloning submodules","fromName":"Robert Schmidt-Cisternas","fromEmail":"robert@schmidt-cisternas.net","sentAt":"2019-09-14T16:07:00Z","receivedAt":"2019-09-14T16:07:14Z","isPatch":false,"sender":{"key":"robert@schmidt-cisternas.net","avatar":null},"body":"Hi,\n\nIn the pursuit of optimizing meta-repo workflows, I wanted to use\nGIT_OBJECT_DIRECTORY to specify a single objects directory used by all\nrepos and submodules on a workstation.\n\nThe idea being that many metarepos will contain similar sets of\nsubmodules, and objects can be reused, thus potentially saving massive\namounts of disk space and network traffic.\n\nHowever, when cloning a repo with submodules, the variable is cleared\nwhen the submodules are cloned recursively.\n\nIs this a bug, or intentional?\n\nThanks,\nRobert Schmidt\n"},{"id":"382434","messageId":"xmqq8sqoazkg.fsf@gitster-ct.c.googlers.com","threadId":"51850","inReplyTo":"CAEq5TVWLxpc2a4fCch=DZfOgDWjKiu6gv0cfVHC3Wdy9581aSg@mail.gmail.com","subject":"Re: GIT_OBJECT_DIRECTORY ignored when cloning submodules","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2019-09-16T18:03:27Z","receivedAt":"2019-09-16T18:03:34Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Robert Schmidt-Cisternas <robert@schmidt-cisternas.net> writes:\n\n> However, when cloning a repo with submodules, the variable is cleared\n\nGIT_OBJECT_DIRECTORY applies to the source object store, not the\ntarget object store---clearing is very much intentional, I think.\n\nAn operation like clone, fetch and push can involve two object\nstores (iow, you can do them between two repositories on the same\nmachine using local transport), and allowing both sides to use the\nsame GIT_OBJECT_DIRECTORY would probably not make much sense.\n"}]}