Skip to content

Commit

Permalink
t6019: demonstrate --ancestry-path A...B breakage
Browse files Browse the repository at this point in the history
Signed-off-by: Kevin Bracey <kevin@bracey.fi>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Kevin Bracey authored and Junio C Hamano committed May 13, 2013
1 parent 8d97506 commit f659031
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion t/t6019-rev-list-ancestry-path.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ test_description='--ancestry-path'
#
# D..M -- M.t == M
# --ancestry-path D..M -- M.t == M
#
# F...I == F G H I
# --ancestry-path F...I == F H I

. ./test-lib.sh

Expand Down Expand Up @@ -63,13 +66,29 @@ test_expect_success 'rev-list D..M -- M.t' '
test_cmp expect actual
'

test_expect_success 'rev-list --ancestry-patch D..M -- M.t' '
test_expect_success 'rev-list --ancestry-path D..M -- M.t' '
echo M >expect &&
git rev-list --ancestry-path --format=%s D..M -- M.t |
sed -e "/^commit /d" >actual &&
test_cmp expect actual
'

test_expect_success 'rev-list F...I' '
for c in F G H I; do echo $c; done >expect &&
git rev-list --format=%s F...I |
sed -e "/^commit /d" |
sort >actual &&
test_cmp expect actual
'

test_expect_failure 'rev-list --ancestry-path F...I' '
for c in F H I; do echo $c; done >expect &&
git rev-list --ancestry-path --format=%s F...I |
sed -e "/^commit /d" |
sort >actual &&
test_cmp expect actual
'

# b---bc
# / \ /
# a X
Expand Down

0 comments on commit f659031

Please sign in to comment.