test-reach: test get_merge_bases_many
commit324dec0191e7579e3990e707d334652c0fe4a786
authorDerrick Stolee <dstolee@microsoft.com>
Fri, 20 Jul 2018 16:33:20 +0000 (20 16:33 +0000)
committerJunio C Hamano <gitster@pobox.com>
Fri, 20 Jul 2018 22:38:55 +0000 (20 15:38 -0700)
tree7c29d194ffc8ad47af2be47d58839ced95d5bef9
parent6255232ec13b038a48326135f2e479797cd0d1f9
test-reach: test get_merge_bases_many

The get_merge_bases_many method returns a list of merge bases for a
single commit (A) against a list of commits (X). Some care is needed in
constructing the expected behavior because the result is not the
expected merge-base for an octopus merge with those parents but instead
the set of maximal commits that are reachable from A and at least one of
the commits in X.

Add get_merge_bases_many to 'test-tool reach' and create a test that
demonstrates that this output returns multiple results. Specifically, we
select a list of three commits such that we output two commits that are
reachable from one of the first two, respectively, and none are
reachable from the third.

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/helper/test-reach.c
t/t6600-test-reach.sh