summaryrefslogtreecommitdiff
path: root/t/t6012-rev-list-simplify.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-03-28 14:37:53 -0700
committerJunio C Hamano <gitster@pobox.com>2013-03-28 14:37:53 -0700
commit436b60ce7aac4cf8e496c57c9baae46094571b22 (patch)
tree7caa04a8f179fa651146ea2ab03fd5724ba5088d /t/t6012-rev-list-simplify.sh
parent39c5835dd68473e6b829d94533e892cffee09286 (diff)
parent4b7f53da7618e94985c9d9d5081b4bc44c45de2f (diff)
downloadgit-436b60ce7aac4cf8e496c57c9baae46094571b22.tar.gz
Merge branch 'jc/remove-treesame-parent-in-simplify-merges'
The --simplify-merges logic did not cull irrelevant parents from a merge that is otherwise not interesting with respect to the paths we are following. This touches a fairly core part of the revision traversal infrastructure; even though I think this change is correct, please report immediately if you find any unintended side effect. * jc/remove-treesame-parent-in-simplify-merges: simplify-merges: drop merge from irrelevant side branch
Diffstat (limited to 't/t6012-rev-list-simplify.sh')
-rwxr-xr-xt/t6012-rev-list-simplify.sh26
1 files changed, 21 insertions, 5 deletions
diff --git a/t/t6012-rev-list-simplify.sh b/t/t6012-rev-list-simplify.sh
index 839ad97b79..8e2ff13423 100755
--- a/t/t6012-rev-list-simplify.sh
+++ b/t/t6012-rev-list-simplify.sh
@@ -56,7 +56,23 @@ test_expect_success setup '
echo "Final change" >file &&
test_tick && git commit -a -m "Final change" &&
- note I
+ note I &&
+
+ git symbolic-ref HEAD refs/heads/unrelated &&
+ git rm -f "*" &&
+ echo "Unrelated branch" >side &&
+ git add side &&
+ test_tick && git commit -m "Side root" &&
+ note J &&
+
+ git checkout master &&
+ test_tick && git merge -m "Coolest" unrelated &&
+ note K &&
+
+ echo "Immaterial" >elif &&
+ git add elif &&
+ test_tick && git commit -m "Last" &&
+ note L
'
FMT='tformat:%P %H | %s'
@@ -79,10 +95,10 @@ check_result () {
'
}
-check_result 'I H G F E D C B A' --full-history
-check_result 'I H E C B A' --full-history -- file
-check_result 'I H E C B A' --full-history --topo-order -- file
-check_result 'I H E C B A' --full-history --date-order -- file
+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_result 'I E C B A' --simplify-merges -- file
check_result 'I B A' -- file
check_result 'I B A' --topo-order -- file