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

Bug: git-subtree: splitting subtree fails when subtree was added, removed and added again

From
Ttionis <git@tionis.dev>
Date
Feb 11, 2024, 20:16 UTC
Message-ID
<1d8fa22c-eb13-4cdb-8499-e19f0dea6b42@tionis.dev>

I discovered a problem in git-subtree that I could also reproduce in a minimal proof of concept over at https://github.com/tionis/git-subtree-bug-poc

The same bug was discussed some time ago on stackoverflow: https://stackoverflow.com/questions/68761778/git-subtree-cache-exists

It seems to occur when a subtree was added, removed, alter added again and then modified in some commit.

This leads to some error with the cache leading to an error message like
fatal: cache for $commit-hash-here already exists!

I'm unsure how to work around this other than modify the history or creating a branch from before the first addition and fixing it there.

Message 1 of 1 in “Bug: git-subtree: splitting subtree fails when subtree was added, removed and added again”
  1. tionisFeb 11, 2024

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.