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

Re: [PATCH] submodule: use cheaper check for submodule pushes

From
Stefan Beller <sbeller@google.com>
Date
Jul 13, 2017, 19:39 UTC
Message-ID
<CAGZ79kYtRbHvfC6d=+eEXCceJam4wwo9XqvY752c_pg6kq90DA@mail.gmail.com>
In-Reply-To
<xmqqa848xjxr.fsf@gitster.mtv.corp.google.com>
On Thu, Jul 13, 2017 at 11:37 AM, Junio C Hamano <gitster@pobox.com> wrote:
Show 10 quoted lines
>
> I think Jonathan's question (which I concurred) is if we also ended
> up relying on the side effect of calling that function (i.e. being
> able to now find objects that are not in our repository but in the
> submodule's object store).  By looking at the eb21c732d6, we can
> tell that the original didn't mean to and didn't add any code that
> relies on the ability to be able to read from the submodule object
> store.  I am not sure if that is still true after 5 years (i.e. is
> there any new code added in the meantime that made us depend on the
> ability to read from submodule object store?).

Yes we are safe, because the function itself only spawns a child process (not using any of the objects).

It's only caller push_unpushed_submodules also doesn't rely on objects loaded after calling push_submodule.

The caller of push_unpushed_submodules (transport.c, transport_push) also doesn't need submodule objects loaded.

> My hunch (and hope) is that we are probably safe, but that is a lot
> weaker than "yes this is a good change we want to apply".

Given the above (I went through the code), all I can do is repeating "yes this is a good change we want to apply".

Thanks, Stefan

Previous: Junio C HamanoNext: Jonathan Nieder
Message 7 of 20 in “submodule: use cheaper check for submodule pushes”
  1. submodule: use cheaper check for submodule pushesStefan Beller, Jul 12, 2017
  2. Jonathan NiederJul 13, 2017
  3. Stefan BellerJul 13, 2017
  4. Junio C HamanoJul 13, 2017
  5. Stefan BellerJul 13, 2017
  6. Junio C HamanoJul 13, 2017
  7. Stefan BellerJul 13, 2017
  8. Jonathan NiederJul 13, 2017
  9. Stefan BellerJul 13, 2017
  10. push: do not add submodule odb as an alternate when recursing on demandStefan Beller, Aug 15, 2017
  11. Jonathan NiederAug 15, 2017
  12. Jonathan NiederAug 15, 2017
  13. Stefan BellerAug 15, 2017
  14. Junio C HamanoAug 15, 2017
  15. Stefan BellerAug 15, 2017
  16. Junio C HamanoAug 16, 2017
  17. Stefan BellerAug 16, 2017
  18. Jonathan NiederAug 16, 2017
  19. Stefan BellerAug 16, 2017
  20. Heiko VoigtAug 16, 2017

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.