Signed-off-by: Derrick Stolee <dstolee@xxxxxxxxxxxxx> --- t/t6600-test-reach.sh | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/t/t6600-test-reach.sh b/t/t6600-test-reach.sh index c9337b6b46..0f60db9c60 100755 --- a/t/t6600-test-reach.sh +++ b/t/t6600-test-reach.sh @@ -78,4 +78,30 @@ test_expect_success 'ref_newer:miss' ' test_reach_two_modes "ref_newer" ' +test_expect_success 'reduce_heads' ' + cat >input <<- EOF && + X:commit-1-10 + X:commit-2-8 + X:commit-3-6 + X:commit-4-4 + X:commit-1-7 + X:commit-2-5 + X:commit-3-3 + X:commit-5-1 + Y:commit-10-10 + Y:commit-3-10 + Y:commit-9-9 + Y:commit-8-1 + EOF + printf "reduce_heads(X):\n" >expect && + git rev-parse commit-5-1 >>expect && + git rev-parse commit-4-4 >>expect && + git rev-parse commit-3-6 >>expect && + git rev-parse commit-2-8 >>expect && + git rev-parse commit-1-10 >>expect && + printf "reduce_heads(Y):\n" >>expect && + git rev-parse commit-10-10 >>expect && + test_reach_two_modes "reduce_heads" +' + test_done -- 2.18.0.118.gd4f65b8d14