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

Re: [BUG?] git-subtree behavior when the -P tree is removed and recreated

From
TBTomi Belan <tomi.belan@gmail.com>
Date
Dec 3, 2012, 10:39 UTC
Message-ID
<CACUV5ocT56iOS3dZsJ4JLo70o1HJv2TSrvBHE646SyQVmOuYRg@mail.gmail.com>
In-Reply-To
<CACUV5odffQoCxr=hTuP+S+DU4+6qD7y=YkTCN3iRr7rjar1bLQ@mail.gmail.com>

Another bump. I reported this back in October, but there hasn't been any response yet...

Note that the bug is still present in git 1.8.0.1.
Tomi
On Sun, Oct 21, 2012 at 11:18 PM, Tomi Belan <tomi.belan@gmail.com> wrote:
Show 40 quoted lines
> This probably got lost in the mail. Could somebody familiar with
> git-subtree take a look?
> Tomi
>
> On Sat, Oct 13, 2012 at 3:47 PM, Tomi Belan <tomi.belan@gmail.com> wrote:
>>
>> Hello folks,
>>
>> I think I might've found a bug in git-subtree: I have a repository
>> containing a directory "foo". I'd like to use its code in other
>> projects, so I want to split it off into its own repository with
>> git-subtree. But it doesn't work as it should. I found out that long
>> ago, my repository contained an unrelated directory also called "foo"
>> which has since been deleted.
>>
>> Steps to reproduce (after installing git-subtree from contrib):
>> git init repo
>> cd repo
>> mkdir foo; touch foo/v1
>> git add -A .; git commit -m v1
>> rm -rf foo; touch v2
>> git add -A .; git commit -m v2
>> mkdir foo; touch foo/v3
>> git add -A .; git commit -m v3
>> git subtree split -P foo -b splitfoo --annotate="split "
>>
>> What should happen: Either (A) splitfoo only contains "split v3", or
>> (B) splitfoo contains "split v1" and "split v3"
>>
>> What happens instead: The parent of "split v3" is "v2", so splitfoo's
>> full history is: "v1" -> "v2" -> "split v3".
>>
>> Git version: 1.7.12.2
>>
>> Bonus questions:
>> - which is the intended behavior, (A) or (B)?
>> - if it's (B), how do I convince git-subtree to do (A) once this bug
>> gets fixed? (I might be getting too far ahead of myself here...)
>>
>> Tomi
Previous: Tomi BelanNext: Tomi Belan
Message 3 of 7 in “[BUG?] git-subtree behavior when the -P tree is removed and recreated”
  1. Tomi BelanOct 13, 2012
  2. Tomi BelanOct 21, 2012
  3. Tomi BelanDec 3, 2012
  4. Tomi BelanDec 19, 2012
  5. Junio C HamanoDec 19, 2012
  6. greened@obbligato.orgJan 1, 2013
  7. greened@obbligato.orgJan 1, 2013

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.