summaryrefslogtreecommitdiffstats
path: root/t/t6600-test-reach.sh
diff options
context:
space:
mode:
authorDerrick Stolee <dstolee@microsoft.com>2018-07-20 18:33:22 +0200
committerJunio C Hamano <gitster@pobox.com>2018-07-21 00:38:55 +0200
commit0c89f715d06082216cc312dcd39e09cb80f7aad7 (patch)
treead60dd015def05baa63de0239be806f333e8a760 /t/t6600-test-reach.sh
parenttest-reach: test get_merge_bases_many (diff)
downloadgit-0c89f715d06082216cc312dcd39e09cb80f7aad7.tar.xz
git-0c89f715d06082216cc312dcd39e09cb80f7aad7.zip
test-reach: test reduce_heads
Signed-off-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t6600-test-reach.sh')
-rwxr-xr-xt/t6600-test-reach.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/t/t6600-test-reach.sh b/t/t6600-test-reach.sh
index d43e1a61d5..17c6467988 100755
--- a/t/t6600-test-reach.sh
+++ b/t/t6600-test-reach.sh
@@ -138,4 +138,26 @@ test_expect_success 'get_merge_bases_many' '
test_three_modes get_merge_bases_many
'
+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
+ EOF
+ {
+ echo "reduce_heads(X):" &&
+ git rev-parse commit-5-1 \
+ commit-4-4 \
+ commit-3-6 \
+ commit-2-8 \
+ commit-1-10 | sort
+ } >expect &&
+ test_three_modes reduce_heads
+'
+
test_done