Subject: Re: [PATCH 0/6] Improvements for ref storage formats with submodules

From: Junio C Hamano <[email-masked]>
Date: Wed, 07 Aug 2024 18:09:04 -0700

Patrick Steinhardt <[email-masked]> writes:

> this small patch series contains some improvements for ref storage
> formats and their interaction with submodules. Notably:
>
>   - Use the correct format for submodules in situations where the parent
>     repository uses a different ref storage format than the submodule.
>
>   - Wire up `--ref-format=` for git-submodule(1), such that users can
>     explicitly use a different ref format for their submodules.
>
>   - Propagate the `--ref-format=` flag of git-clone(1) into submodules
>     when using `--recursive`.
>
> The first three patches implement improvements for the above three
> issues and introduce tests. The test did hit some memory leaks, which
> get fixed by patches 3 to 6 such that the new test can be marked as leak
> free.

Nicely done.  I've read through the series and did not find any
design decisions in the series questionable.

As to propagating the choice of ref backend down from the
superproject to the submodule, I am not sure if it matters all that
much, so I view it as a relative low priority.  If somebody wants to
use a specific ref backend for their repositories, then they want
all their "git init" (or init_db()) to use that ref backend, and
would arrange configuration to make it so.  When "git submodule
init" internally calls "git init" (or init_db()), as long as we make
sure such a choice would propagate to the new repository that
happens to the one used for that submodule, we do not necessarily
need to have a custom logic that says "ah, the user did not say
anything about the ref backend, so let me peek the one used in the
superproject and propagate it down".

Thanks.