Re: [PATCH v2 07/10] submodule: error out if gitdir name is too long
On Mon, Sep 8, 2025, at 16:01, Adrian Ratiu wrote:
Show 12 quoted lines
> Encoding submodule names increases their name size, so there is an
> increased risk to hit the max filename length in the gitdir path.
> (the likelihood is still rather small, so it's an acceptable risk)
>
> This gitdir file-name-too-long corner case can be be addressed in
> multiple ways, including sharding or trimming, however for now, just
> add the portable logic (suggested by Peff) to detect the corner case
> then error out to avoid comitting to a specific policy (or policies).
>
> In the future, instead of throwing an error (which we do now anyway
> without submodule encoding), we could maybe let the user specify via
> configs how to address this case, eg pick trimming or sharding.
>
> Suggested-by: Jeff King <peff@peff.net>
> Signed-off-by: Adrian Ratiu <adrian.ratiu@collabora.com>
> ---