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

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

From
CSColin Stagner <ask+git@howdoi.land>
Date
Jul 9, 2026, 01:49 UTC
Message-ID
<f557bfcf-ffd2-4903-8015-97fff97dbe09@howdoi.land>
In-Reply-To
<20260706115816.20267-2-ijackson@chiark.greenend.org.uk>
On 7/6/26 06:58, Ian Jackson wrote:
> Another, bigger, reason is that current git-subtree generates unmarked
> subtree merges (ie, without any git-subtree trailers)

Subtree merges can be performed without git-subtree, via the `-X subtree` merge strategy option. While the design of RIIR git-subtree is outside the scope of this patch series, this may be worth thinking about in your rewrite.

> --- a/contrib/subtree/git-subtree.sh
> +++ b/contrib/subtree/git-subtree.sh
> @@ -278,6 +278,20 @@ main () {
> +reject_if_v2_config () {
> +	local config=.git-subtree/config

This is a nit, but `local` is not specified by POSIX. I know it is used elsewhere within git-subtree, but it is specifically discouraged.

> +	if git rev-parse --verify -q "$rev:$config"; then

For subtree split, should we also test for this file in tree you are splitting: i.e., "$dir/$config"? The answer might be no.

I think that subtree merge should only test the top-level project, as this patch does now.

Colin
Previous: Junio C HamanoNext: Ian Jackson
Message 6 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.