git/list[1] front-page[2] threads[3] people[4] search[5] about
wed 2026-10-07 16:54 UTC

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

From
IJIan Jackson <ijackson@chiark.greenend.org.uk>
Date
Apr 20, 2026, 09:57 UTC
Message-ID
<27109.63619.90318.366157@chiark.greenend.org.uk>
In-Reply-To
<27109.13129.424068.382997@chiark.greenend.org.uk>
Ian Jackson writes ("Re: [PATCH v2 0/3] contrib/subtree: reduce recursion during split"):
Show 11 quoted lines
> Algorithm
> 
> I don't think it is going to be possible to precisely reproduce the
> output of the existing git-subtree split.  Indeed the existing
> git-subtree split is a bit cavalier with metadata (eg `committer` [1])
> which probably ought to be changed in any case.
> 
> Even so, it should be possible to avoid foolishly rewriting the whole
> history of the subtree, since we can stop at all the merges made by
> "git-subtree merge", which are easily detectable by the extra metadata
> keyword fields in the commit message.
This last part turns out to be false.

It is only `git-subtree add` that puts this metadata in the commit message; `git-subtree merge` doesn't. This makes it very hard to distinguish a subtree merge from (say) a merge of a branch that predates the subtree add.

I need to think about this some more but I doubt this can be made to work well without more significant changes, including to the data model. There would have to be some kind of compatibility arrangement to handle existing histories.

Colin, is that OK with you? If you would prefer, I could choose a different name for the resulting program. My preference would be, with your consent, to continue to call it "git-subtree", version 2.

Regards, Ian.

-- 
Ian Jackson <ijackson@chiark.greenend.org.uk>   These opinions are my own.  

Pronouns: they/he.  If I emailed you from @fyvzl.net or @evade.org.uk,
that is a private address which bypasses my fierce spamfilter.
Previous: Junio C HamanoNext: Colin Stagner
Message 15 of 22 in “contrib/subtree: reduce function side-effects”
  1. 1/3 contrib/subtree: reduce function side-effectsColin Stagner, Mar 5, 2026
  2. 2/3 contrib/subtree: functionalize split traversalColin Stagner, Mar 5, 2026
  3. 3/3 contrib/subtree: reduce recursion during splitColin Stagner, Mar 5, 2026
  4. 0/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.