[PATCH] subtree: performance improvement for finding unexpected parent commits

2018-10-12 Thread Roger Strain
, the additional wait time is unaccepatable. Replacing the command with git rev-parse resulted in significantly increased performance, with the command in question returning instantly. Signed-off-by: Roger Strain Thanks-to: Junio C Hamano --- contrib/subtree/git-subtree.sh | 2 +- 1 file changed, 1

[PATCH v2 3/4] subtree: use commits before rejoins for splits

2018-10-11 Thread Roger Strain
From: "Strain, Roger L" Adds recursive evaluation of parent commits which were not part of the initial commit list when performing a split. Split expects all relevant commits to be reachable from the target commit but not reachable from any previous rejoins. However, a branch could be based on a

[PATCH v2 0/4] Multiple subtree split fixes regarding complex repos

2018-10-11 Thread Roger Strain
After doing some testing at scale, determined that one call was taking too long; replaced that with an alternate call which returns the same data significantly faster. Also, if anyone has any other feedback on these I'd really love to hear it. It's working better for us (as in, it actually gene

[PATCH v2 1/4] subtree: refactor split of a commit into standalone method

2018-10-11 Thread Roger Strain
From: "Strain, Roger L" In a particularly complex repo, subtree split was not creating compatible splits for pushing back to a separate repo. Addressing one of the issues requires recursive handling of parent commits that were not initially considered by the algorithm. This commit makes no functi

[PATCH v2 2/4] subtree: make --ignore-joins pay attention to adds

2018-10-11 Thread Roger Strain
From: "Strain, Roger L" Changes the behavior of --ignore-joins to always consider a subtree add commit, and ignore only splits and squashes. The --ignore-joins option is documented to ignore prior --rejoin commits. However, it additionally ignored subtree add commits generated when a subtree was

[PATCH v2 4/4] subtree: improve decision on merges kept in split

2018-10-11 Thread Roger Strain
From: "Strain, Roger L" When multiple identical parents are detected for a commit being considered for copying, explicitly check whether one is the common merge base between the commits. If so, the other commit can be used as the identical parent; if not, a merge must be performed to maintain his