{"thread":{"id":"35570","subject":"git subtree split - nested subtree history not preserved on parent split","startedAt":"2013-12-24T10:15:17Z","lastAt":"2013-12-24T10:15:17Z","messageCount":1,"participants":["Alexander Boyd"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"232376","messageId":"CAPFSJk8B5C3mvoHXtib5G5MFTEBZuo5zyLQp2UypS66Z9ASrWQ@mail.gmail.com","threadId":"35570","inReplyTo":null,"subject":"git subtree split - nested subtree history not preserved on parent split","fromName":"Alexander Boyd","fromEmail":"alex@opengroove.org","sentAt":"2013-12-24T10:15:17Z","receivedAt":"2013-12-24T10:15:17Z","isPatch":false,"sender":{"key":"alex@opengroove.org","avatar":null},"body":"Hello,\n\nI've been playing around with nested subtrees, and I've discovered\nwhat I'm pretty sure is a bug: when I import a repo into a nested\ndirectory with `git subtree add`, then split the imported directory's\nparent, the subtree's history is lost.\n\nTo clarify:\n\n# Create a repo with a single file\ngit init nested\ncd nested\necho contents > test\ngit add test\ngit commit -m \"Add foo\"\ncd ..\n\n# Create an outer repo\ngit init outer\ncd outer\necho contents > bar\ngit add bar\ngit commit -m \"Add bar\"\n\n# Import nested into outer/dir/nested\ngit subtree add --prefix dir/nested ../nested master\n\n# Split outer/dir\ngit subtree split --prefix dir --branch history-of-dir\n\nNow `git log master` includes \"Add foo\" in its history but `git log\nhistory-of-dir` doesn't, even though 'nested' is a child of 'dir'.\n\nI have a (very) rough guess as to what's going on: `git subtree split`\nsees the side of the merge importing nested's changes as only touching\nfiles \"outside of\" the directory it's splitting out, so it happily\nomits them from the split history.\n\nHas anyone else run into this?\n\n-Alex\n"}]}