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

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

From
IJIan Jackson <ijackson@chiark.greenend.org.uk>
Date
Jul 6, 2026, 11:58 UTC
Message-ID
<20260706115816.20267-3-ijackson@chiark.greenend.org.uk>
In-Reply-To
<20260706115816.20267-1-ijackson@chiark.greenend.org.uk>
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
---
 contrib/subtree/t/t7900-subtree.sh | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
diff --git a/contrib/subtree/t/t7900-subtree.sh b/contrib/subtree/t/t7900-subtree.sh
index 4194687cfb..e8fa640166 100755
--- a/contrib/subtree/t/t7900-subtree.sh
+++ b/contrib/subtree/t/t7900-subtree.sh
@@ -439,6 +439,24 @@ test_expect_success 'split sub dir/ with --rejoin' '
 	)
 '
 
+test_expect_success 'split fail on RIIR git subtree data' '
+	subtree_test_create_repo "$test_count" &&
+	subtree_test_create_repo "$test_count/sub proj" &&
+	test_create_commit "$test_count" main1 &&
+	test_create_commit "$test_count/sub proj" sub1 &&
+	(
+		cd "$test_count" &&
+		git fetch ./"sub proj" HEAD &&
+		git subtree add --prefix="sub dir" FETCH_HEAD &&
+		# simulate RIIR git-subtree generated data
+		mkdir .git-subtree &&
+		echo "# sabotage" >.git-subtree/config &&
+		git add .git-subtree/config &&
+		git commit -m sabotage &&
+		test_must_fail git subtree split -P "sub dir" HEAD
+	)
+'
+
 # Tests that commits from other subtrees are not processed as
 # part of a split.
 #
-- 
2.47.3
Previous: Ian JacksonNext: Ian Jackson
Message 2 of 20 in “git-subtree: Bail out if we find output from Rust rewrite”
  1. 1/2 git-subtree: Bail out if we find output from Rust rewriteIan Jackson, Jul 6, 2026
  2. 2/2 git-subtree: Bail out if we find output from Rust rewrite (test)Ian Jackson, Jul 6, 2026
  3. 0/2 git-subtree: Bail out if we find output from Rust rewriteIan Jackson, Jul 6, 2026
  4. Junio C HamanoJul 6, 2026
  5. Ian JacksonJul 6, 2026
  6. Junio C HamanoJul 6, 2026
  7. Colin StagnerJul 9, 2026
  8. Colin StagnerJul 9, 2026
  9. Ian JacksonJul 9, 2026
  10. Phillip WoodJul 9, 2026
  11. Colin StagnerJul 9, 2026
  12. Ian JacksonJul 10, 2026
  13. D. Ben KnobleJul 11, 2026
  14. Ian JacksonJul 11, 2026
  15. Junio C HamanoJul 11, 2026
  16. Colin StagnerJul 11, 2026
  17. Ian JacksonJul 12, 2026
  18. Junio C HamanoJul 12, 2026
  19. Colin StagnerJul 15, 2026
  20. Junio C HamanoAug 26, 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.