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

git-subtree rewrite

From
IJIan Jackson <ijackson@chiark.greenend.org.uk>
Date
Apr 22, 2026, 17:12 UTC
Message-ID
<27113.384.389621.34039@chiark.greenend.org.uk>
In-Reply-To
<27109.63619.90318.366157@chiark.greenend.org.uk>
Hi, Avery.
tl;dr:
  Do you object if I use the name git-subtree for my rewrite?
  I intend it to be forward compatible with existing git-subtree
  histories and existing command line invocations.

I've been looking into your git-subtree program. Thanks for it; it is definitely solving a very real problem reasonably well. [1] However, I think the existing implementation (in shell) and data model need some work.

I have done some experiments, with enough success that I have more or less decided to try to rewrite git-subtree.

I am intending to make my rewrite able to work with existing histories (ie, projects which have done git-subtree add and git-subtree merge). I intend to support the existing command line interface, although I may improve that later.

I am also hoping to be able to define the data model more formally.

The git maintainers and others on the git mailing list seem reasonably enthusiastic about all this. My nascent rewrite is a a standalone Rust package, and the plan would be for it to obsolete the shell script in git.git/contrib, but live outside the git project itself.

I would like to call my new program "git-subtree" and have it use (and extend) the exisitng `git-subtree-...:` metadata that `git-subtree add` puts into its generated commits.

Obviously there are compatibility, packaging, and deployment considerations, which I'm keeping in mind. I don't want to break anyone downstream. So I will proceed reasonably cautiously.

I hope this is all OK with you. If not, or if you have questions, please let me know, using reply-all to this email (so the mailing list gets a copy).

If I don't hear from you I will go ahead. The actual programming work is going to take a while so watch this space but not too closely :-).

Regards, Ian.

[1] See also my blog post
   Never use git submodules
   https://diziet.dreamwidth.org/14666.html
-- 
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: Johannes SchindelinNext: Junio C Hamano
Message 18 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.