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

[PATCH 0/2] git-subtree: Bail out if we find output from Rust rewrite

From
IJIan Jackson <ijackson@chiark.greenend.org.uk>
Date
Jul 6, 2026, 11:58 UTC
Message-ID
<20260706115816.20267-1-ijackson@chiark.greenend.org.uk>

My rewrite of git-subtree is coming along fairly nicely. I have done a bunch of data model design work, as well as successfully implemented the "split" operation. (It's several orders of magnitude faster than the shell script implementation, and produces much better output.)

I have concluded that it is going to be too difficult to have bidirectional interoperability, for a number of reasons. One reason is that I want to change the way split commits are constructed and they should be as stable as we can make them.

Another, bigger, reason is that current git-subtree generates unmarked subtree merges (ie, without any git-subtree trailers); reliably figuring out whether something is such a merge requires a complete history walk, which is very unfortunate. To avoid having to do this in perpetuity, I plan to have new git-subtree assume that commits which show signs of use of new git-subtree are not unmarked subtree merges generated by old git-subtree.

So mycompatibility plan is:
 - New git-subtree can read old git-subtree data
 - Old git-subtree (this one here) will *not* handle new data

New git-subtree needs an in-downstream-tree config file with at least an indication of the downstream project name, because otherwise split commits can be quite inscrutable. So the presence of that file is a convenient way to signal the change.

The purpose of the present patch is to help prevent messes, where old git-subtree is used *afer* new git-subtree, generating output that no tooling can handle correctly. We change old git-subtree to spot the new git-subtree's config file, and bail out.

Right now there is no new data in existence, becauwe new git-subtree is not useable. So right now this change has no effect.

But if we ship this change now, users with this change will be defended from this lossage, as their collaborators start to use new git-subtree. I'm hoping to possibly persuade distros etc. to take this patch as a backport.

I wasn't sure how precisely to word the error message. I chose to refer to the new tool, as if it really exists. By the time anyone actually seex this message, it will do.

Ian Jackson (2):
  git-subtree: Bail out if we find output from Rust rewrite
  git-subtree: Bail out if we find output from Rust rewrite (test)
 contrib/subtree/git-subtree.sh     | 18 ++++++++++++++++++
 contrib/subtree/t/t7900-subtree.sh | 18 ++++++++++++++++++
 2 files changed, 36 insertions(+)
-- 
2.47.3
Next: Ian Jackson
Message 1 of 20 in “git-subtree: Bail out if we find output from Rust rewrite”
  1. 0/2 git-subtree: Bail out if we find output from Rust rewriteIan Jackson, Jul 6, 2026
  2. 1/2 git-subtree: Bail out if we find output from Rust rewriteIan Jackson, Jul 6, 2026
  3. Junio C HamanoJul 6, 2026
  4. Ian JacksonJul 6, 2026
  5. Junio C HamanoJul 6, 2026
  6. Colin StagnerJul 9, 2026
  7. Ian JacksonJul 9, 2026
  8. Phillip WoodJul 9, 2026
  9. Colin StagnerJul 9, 2026
  10. Ian JacksonJul 10, 2026
  11. Colin StagnerJul 15, 2026
  12. D. Ben KnobleJul 11, 2026
  13. Ian JacksonJul 11, 2026
  14. Junio C HamanoJul 11, 2026
  15. Colin StagnerJul 11, 2026
  16. Ian JacksonJul 12, 2026
  17. Junio C HamanoJul 12, 2026
  18. Junio C HamanoAug 26, 2026
  19. 2/2 git-subtree: Bail out if we find output from Rust rewrite (test)Ian Jackson, Jul 6, 2026
  20. Colin StagnerJul 9, 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.