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

Re: BUG: git subtree split gets confused on removed and readded directory

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 15, 2016, 23:44 UTC
Message-ID
<xmqq4meeflws.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<56991CFC.7060705@ruhr-uni-bochum.de>
Marcus Brinkmann <marcus.brinkmann@ruhr-uni-bochum.de> writes:
Show 16 quoted lines
> I made a simple test repository showing the problem here:
> https://github.com/lambdafu/git-subtree-split-test
>
> After creating the master branch, I created the split/bar branch like this:
>
> $ git subtree split -P bar -b split/bar
>
> The resulting history is confused by the directory "bar" which was
> added, removed and then re-added again.  The recent history up to adding
> the directory the second time is fine.  But then it seems to loose track
> and add the parent of that commit up to the initial commit in the history.
>
> I'd expect that the parent of the readding commit is an empty tree
> commit (which removed the last files in the directory), and that before
> that are commits that reflect the initial creation of that directory
> with its files, but rewritten as a subtree, of course.
Thanks for a report.
David, does this ring a bell?
Dave, does your fix "subtree split" we saw recently on the list
    http://article.gmane.org/gmane.comp.version-control.git/284125
help this?
Previous: Marcus BrinkmannNext: David Ware
Message 2 of 12 in “BUG: git subtree split gets confused on removed and readded directory”
  1. Marcus BrinkmannJan 15, 2016
  2. Junio C HamanoJan 15, 2016
  3. David WareJan 17, 2016
  4. David A. GreeneJan 17, 2016
  5. contrib/subtree: Split history with empty trees correctly (was: Re: BUG: git subtree split gets confused on removed and readded directory)Marcus Brinkmann, Jan 20, 2016
  6. David A. GreeneJan 20, 2016
  7. Marcus BrinkmannJan 20, 2016
  8. David A. GreeneJan 28, 2016
  9. Marcus BrinkmannJan 24, 2016
  10. David A. GreeneJan 28, 2016
  11. Marcus BrinkmannJan 28, 2016
  12. David A. GreeneFeb 3, 2016

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.