git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Submodules and GIT_ALTERNATE_OBJECT_DIRECTORIES

From
Jens Lehmann <jens.lehmann@web.de>
Date
Oct 3, 2014, 11:17 UTC
Message-ID
<542E85B5.3020101@web.de>
In-Reply-To
<878ul19r5y.fsf@steelpick.2x.cz>
Am 30.09.2014 um 15:25 schrieb Michal Sojka:
Show 9 quoted lines
> I'd like to shorten the time needed by our continuous integration (CI)
> tool to clone the source repositories. Currently the full clone takes
> about 10 minutes (even from local server). Our main repository has
> several submodules so the CI tool runs "git submodule update --init". My
> idea was to use GIT_ALTERNATE_OBJECT_DIRECTORIES to cache objects from
> several submodule repositories locally. However, this does not work
> because GIT_ALTERNATE_OBJECT_DIRECTORIES is considered local to the
> super-project and is not propagated to the "git clone" for submodules
> (git-submodule.sh calls clear_local_git_env).
 >
Show 6 quoted lines
> My question is why is GIT_ALTERNATE_OBJECT_DIRECTORIES considered local
> to the repository? If I could modify the command-line I would use the
> "git submodule update" with the --reference option, which is propagated
> to clones of all submodules. Letting GIT_ALTERNATE_OBJECT_DIRECTORIES
> propagate to the submodules should have the same effect as --reference
> option. So why it is not propagated?

Because then it would /always/ propagate? So while that would have the same effect as using the --reference option, not using the --reference option would behave differently, no?

Previous: Michal SojkaNext: Michal Sojka
Message 2 of 4 in “Submodules and GIT_ALTERNATE_OBJECT_DIRECTORIES”
  1. Michal SojkaSep 30, 2014
  2. Jens LehmannOct 3, 2014
  3. Michal SojkaOct 3, 2014
  4. Jens LehmannOct 4, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.