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

Re: git-diff-tree does not use alternate objects for submodules

From
Junio C Hamano <gitster@pobox.com>
Date
May 9, 2012, 22:53 UTC
Message-ID
<7vwr4lotjl.fsf@alter.siamese.dyndns.org>
In-Reply-To
<7v1umtq9pm.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
Show 13 quoted lines
> Heiko Voigt <hvoigt@hvoigt.net> writes:
> ...
>> I will have a look if I can come up with something that reads the
>> submodules alternate config and uses it. Do you have other config
>> related things in mind that might be missing?
>
> No, I do not, and that is exactly the point.
>
> Making the process that works in the top-level superproject to imitate
> what would happen if the processing happened inside the submodule is what
> invited a bug like this.  Who knows what other discrepancies remain there.
>
> If we forked a separate process,...

Having said all that, we seem to have come too far and it is probably too painful to revert the approach to contaminate the obj_hash (in object.c), the set of refs (in refs.c) and the like in the top-level superproject process with data borrowed from submodules repository [*1*]. So not only I do not mind seeing you try solving it inside the superproject process, I would appreciate and encourage the attempt. One thing to be careful about is relative paths stored in the objects/info/alternates; they are relative to the object database of the repository the "alternates" is specified, not relative to the superproject that happens to contain the submodule.

Thanks.
[Footnote]

*1* This is a wrong approach not only because it will invite this kind of bug, but also because it will bloat the process working on the superproject. When taken alone, either of the superproject or the submodule repository may be of comfortably workable size, but a single process that is working on the superproject may ran out of a per-process resource limit if it is made to also slurp data for the submodules, especially when working on a project with dozens of submodules.

Previous: Junio C HamanoNext: Heiko Voigt
Message 6 of 12 in “git-diff-tree does not use alternate objects for submodules”
  1. Orgad and Raizel ShanehMay 8, 2012
  2. Junio C HamanoMay 8, 2012
  3. Junio C HamanoMay 8, 2012
  4. Heiko VoigtMay 9, 2012
  5. Junio C HamanoMay 9, 2012
  6. Junio C HamanoMay 9, 2012
  7. Heiko VoigtMay 13, 2012
  8. Heiko VoigtMay 13, 2012
  9. teach add_submodule_odb() to look for alternatesHeiko Voigt, May 14, 2012
  10. Junio C HamanoMay 14, 2012
  11. Heiko VoigtMay 14, 2012
  12. Junio C HamanoMay 14, 2012

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.