All of lore.kernel.org
 help / color / mirror / Atom feed
* git subtree split - nested subtree history not preserved on parent split
@ 2013-12-24 10:15 Alexander Boyd
  0 siblings, 0 replies; only message in thread
From: Alexander Boyd @ 2013-12-24 10:15 UTC (permalink / raw)
  To: git

Hello,

I've been playing around with nested subtrees, and I've discovered
what I'm pretty sure is a bug: when I import a repo into a nested
directory with `git subtree add`, then split the imported directory's
parent, the subtree's history is lost.

To clarify:

# Create a repo with a single file
git init nested
cd nested
echo contents > test
git add test
git commit -m "Add foo"
cd ..

# Create an outer repo
git init outer
cd outer
echo contents > bar
git add bar
git commit -m "Add bar"

# Import nested into outer/dir/nested
git subtree add --prefix dir/nested ../nested master

# Split outer/dir
git subtree split --prefix dir --branch history-of-dir

Now `git log master` includes "Add foo" in its history but `git log
history-of-dir` doesn't, even though 'nested' is a child of 'dir'.

I have a (very) rough guess as to what's going on: `git subtree split`
sees the side of the merge importing nested's changes as only touching
files "outside of" the directory it's splitting out, so it happily
omits them from the split history.

Has anyone else run into this?

-Alex

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-12-24 10:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-24 10:15 git subtree split - nested subtree history not preserved on parent split Alexander Boyd

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.