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

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

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 1, 2026, 22:13 UTC
Message-ID
<xmqqv7c13o5l.fsf@gitster.g>
In-Reply-To
<a1a07433-224e-4477-ae8a-3875fa98faf8@howdoi.land>
Colin Stagner <ask+git@howdoi.land> writes:
Show 31 quoted lines
> 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

So after this message the thread went dark (except for a side discussion about rewriting subtree in Rust, which I do think it is a good direction to go in the longer term). Are we still interested in polishing the original patch further?

While I do agree that avoiding bash-isms in the main part of Git and sticking to vanilla POSIX has merit, this particular one seems more like an artificial limit imposed by dash than sticking to the POSIX as the common denoninator, at least to me.

I am tempted to mark the topic as stalled, to be discarded for inaction, but thought I should ask first before doing so.

Thanks.
Previous: Ian JacksonNext: Ian Jackson
Message 19 of 22 in “contrib/subtree: reduce recursion during split”
  1. 0/3 contrib/subtree: reduce recursion during splitColin Stagner, Mar 5, 2026
  2. 1/3 contrib/subtree: reduce function side-effectsColin Stagner, Mar 5, 2026
  3. 2/3 contrib/subtree: functionalize split traversalColin Stagner, Mar 5, 2026
  4. 3/3 contrib/subtree: reduce recursion during splitColin Stagner, Mar 5, 2026
  5. Junio C HamanoMar 13, 2026
  6. Junio C HamanoMar 13, 2026
  7. Junio C HamanoApr 15, 2026
  8. Ben KnobleApr 15, 2026
  9. Ian JacksonApr 16, 2026
  10. Junio C HamanoApr 16, 2026
  11. Colin StagnerApr 17, 2026
  12. Ian JacksonApr 19, 2026
  13. Ben KnobleApr 20, 2026
  14. Junio C HamanoApr 20, 2026
  15. Ian JacksonApr 20, 2026
  16. Colin StagnerApr 21, 2026
  17. Johannes SchindelinApr 22, 2026
  18. git-subtree rewriteIan Jackson, Apr 22, 2026
  19. Junio C HamanoJun 1, 2026
  20. Ian JacksonJun 2, 2026
  21. Colin StagnerJun 3, 2026
  22. Ian JacksonJun 3, 2026

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.