summaryrefslogtreecommitdiff
path: root/t/t6012-rev-list-simplify.sh
diff options
context:
space:
mode:
authorKevin Bracey <kevin@bracey.fi>2013-05-16 15:32:37 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-05-16 18:51:09 (GMT)
commit143f1eafdb0d326b1a8e3d15bf59a497b9440bf1 (patch)
tree4d0bcbc1d3556b68a055cfd76dabfbbd51d33517 /t/t6012-rev-list-simplify.sh
parent9c129eab99f16d7bb174b35573e68ae6a5d02efe (diff)
downloadgit-143f1eafdb0d326b1a8e3d15bf59a497b9440bf1.zip
git-143f1eafdb0d326b1a8e3d15bf59a497b9440bf1.tar.gz
git-143f1eafdb0d326b1a8e3d15bf59a497b9440bf1.tar.bz2
simplify-merges: drop merge from irrelevant side branch
Reimplement commit 4b7f53da on top of the new simplify-merges infrastructure, tightening the condition to only consider root parents; the original version incorrectly dropped parents that were TREESAME to anything. Original log message follows. The merge simplification rule stated in 6546b59 (revision traversal: show full history with merge simplification, 2008-07-31) still treated merge commits too specially. Namely, in a history with this shape: ---o---o---M / x---x---x where three 'x' were on a history completely unrelated to the main history 'o' and do not touch any of the paths we are following, we still said that after simplifying all of the parents of M, 'x' (which is the leftmost 'x' that rightmost 'x simplifies down to) and 'o' (which would be the last commit on the main history that touches the paths we are following) are independent from each other, and both need to be kept. That is incorrect; when the side branch 'x' never touches the paths, it should be removed to allow M to simplify down to the last commit on the main history that touches the paths. Suggested-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Kevin Bracey <kevin@bracey.fi> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t6012-rev-list-simplify.sh')
-rwxr-xr-xt/t6012-rev-list-simplify.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/t/t6012-rev-list-simplify.sh b/t/t6012-rev-list-simplify.sh
index 4e55872..57ce239 100755
--- a/t/t6012-rev-list-simplify.sh
+++ b/t/t6012-rev-list-simplify.sh
@@ -110,7 +110,7 @@ check_result 'L K J I H G F E D C B A' --full-history
check_result 'K I H E C B A' --full-history -- file
check_result 'K I H E C B A' --full-history --topo-order -- file
check_result 'K I H E C B A' --full-history --date-order -- file
-check_outcome failure 'I E C B A' --simplify-merges -- file
+check_result 'I E C B A' --simplify-merges -- file
check_result 'I B A' -- file
check_result 'I B A' --topo-order -- file
check_result 'H' --first-parent -- another-file