From 18c3489593338aa4d27c49c621f4903290011b52 Mon Sep 17 00:00:00 2001 From: Han Date: Tue, 21 Jan 2014 00:58:21 -0800 Subject: [PATCH] Add TODO to README about cherry-pick-like commits --- README | 3 +++ git-subhistory.sh | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/README b/README index 0dcd342..1d7f982 100644 --- a/README +++ b/README @@ -168,6 +168,9 @@ git-subhistory assimilate commits is prioritized, and git-subhistory merge will be made more sophisticated and will automatically resolve conflicts in the "Main" tree outside "path/to/sub/" in favor of HEAD.) + (Note: it is recommended to only split from/merge into the same Main + branch. TODO: explain why merging in commits split from another + branch can be like cherry-picking.) git-subhistory merge diff --git a/git-subhistory.sh b/git-subhistory.sh index 3a25e4d..2cda5b7 100755 --- a/git-subhistory.sh +++ b/git-subhistory.sh @@ -195,7 +195,9 @@ subhistory_assimilate () { # + [FN1]: others weren't split into ancestors of SPLIT_HEAD, and hence # aren't in the split-to-orig-map, and thus couldn't be a rewritten # parent. This is actually why merge explicitly doesn't invert splitting - # of all commits, it only inverts splitting of ancestors of HEAD. + # of all commits, it only inverts splitting of ancestors of HEAD, at the + # cost of the potentially surprising cherry-pick-like commits described + # in the README. # + [FN2]: augh, this takes more than a dozen lines: looping over each # parent, read the tree for the (rewritten) parent into the index, delete # "path/to/sub/" from the index, and then if this is the first parent,