Subject: Re: [PATCH v2 0/3] contrib/subtree: reduce recursion during split

From: Colin Stagner <[email-masked]>
Date: Thu, 16 Apr 2026 23:50:21 -0500

On 4/16/26 08:25, Ian Jackson wrote:

> FTR Debian supports multiple options for /bin/sh.  The shell in
> question, with the limit that's troubling us, is dash.

Correct, I experience this behavior in dash.

> Why not run the script under bash in non-POSIX mode instead?  I think
> that would sidestep the problem. 

Our coding guidelines favor POSIX constructs over non-POSIX constructs, 
including for shell scripts [1]. POSIX helps us stay portable.

I'm not convinced that adding more shell interpreters to the mix would 
be a net win in terms of stability or consistency. This patch series 
addresses issues that arise from different implementations of sh. Adding 
bash vs sh to the mix will probably just make more bugs.

> If it had been me I would probably have used Rust and libgit2.

git-subtree has been around since 2009, so you would have first needed 
to invent Rust. :-) That said, a native Rust version of 
git-subtree-split would be much faster and easier to read.

Thanks for looking at this,

Colin

[1]: https://git-scm.com/docs/CodingGuidelines