3 test_description
='blaming through history with topic branches'
5 TEST_PASSES_SANITIZE_LEAK
=true
8 # Creates the history shown below. '*'s mark the first parent in the merges.
9 # The only line of file.t is changed in commit B2
17 test_expect_success setup
'
18 test_commit A0 file.t line0 &&
20 git reset --hard A0 &&
22 test_commit B2 file.t line0changed &&
23 git reset --hard A1 &&
25 git reset --hard A1 &&
27 git reset --hard A2 &&
31 test_expect_success
'blame --reverse --first-parent finds A1' '
32 git blame --porcelain --reverse --first-parent A0..A3 -- file.t >actual_full &&
33 head -n 1 <actual_full | sed -e "s/ .*//" >actual &&
34 git rev-parse A1 >expect &&
35 test_cmp expect actual