3 test_description='blaming trough history with topic branches'
6 # Creates the history shown below. '*'s mark the first parent in the merges.
7 # The only line of file.t is changed in commit B2
15 test_expect_success setup '
16 test_commit A0 file.t line0 &&
18 git reset --hard A0 &&
20 test_commit B2 file.t line0changed &&
21 git reset --hard A1 &&
23 git reset --hard A1 &&
25 git reset --hard A2 &&
29 test_expect_success 'blame --reverse --first-parent finds A1' '
30 git blame --porcelain --reverse --first-parent A0..A3 -- file.t >actual_full &&
31 head -n 1 <actual_full | sed -e "s/ .*//" >actual &&
32 git rev-parse A1 >expect &&
33 test_cmp expect actual