On Fri, Jun 29, 2018 at 9:13 AM Derrick Stolee <dstolee@xxxxxxxxxxxxx> wrote: > > 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 && See 6ac767e5c00 (t6036, t6042: prefer test_cmp to sequences of test, 2018-05-24) on how to avoid some forks here: git rev-parse >expect \ many HEADs or Tips &&