Junio C Hamano [off-list ref] writes:
Linus Torvalds [off-list ref] writes:
quoted
Junio, I think there is something wrong with git-merge. It sometimes takes
up to ten seconds, and it's stuck at the
git-show-branch --independent "$head" "$@"
call.
I don't know quite what that thing is even meant to do (we do already know
the parents, why do we do something special here?) but even apart from
that, the whole thing must be doing something seriously wrong, since it
takes so long. Does it check the whole commit history?
The code is to cull redundant parents primarily in octopus and
is not strictly necessary.
Wrong. The commit log says it was to remove redundant parents;
I think this as a reaction after seeing a few incorrectly made
merge commits in the kernel archive.
..., but in your case you never do an octopus so
that would be the other branch head) to see what is going on
please?
Disregard this request please. I see a few commits that this
step takes a long time to process in the kernel archive. The
last merge before you left to Ottawa was one of them.
b5032a5 48ce8b0
I do not think we need to do the --independent check there
especially for two-head cases because we have already done
fast-forward and up-to-date tests when we get there, so let's
revert that part from commit 6ea2334.
-- >8 --
diff --git a/git-merge.sh b/git-merge.sh
index 24e3b50..ee41077 100755
--- a/git-merge.sh
+++ b/git-merge.sh
@@ -314,7 +314,11 @@ # If we have a resulting tree, that mean
# auto resolved the merge cleanly.
if test '' != "$result_tree"
then
- parents=$(git-show-branch --independent "$head" "$@" | sed -e 's/^/-p /')
+ parents="-p $head"
+ for remote
+ do
+ parents="$parents -p $remote"
+ done
result_commit=$(echo "$merge_msg" | git-commit-tree $result_tree $parents) || exit
finish "$result_commit" "Merge $result_commit, made by $wt_strategy."
dropsave