1#!/bin/sh
2
3test_description="recursive merge corner cases w/ renames but not criss-crosses"
4# t6036 has corner cases that involve both criss-cross merges and renames
5
6. ./test-lib.sh
7
8test_expect_success 'setup rename/delete + untracked file' '
9 echo "A pretty inscription" >ring &&
10 git add ring &&
11 test_tick &&
12 git commit -m beginning &&
13
14 git branch people &&
15 git checkout -b rename-the-ring &&
16 git mv ring one-ring-to-rule-them-all &&
17 test_tick &&
18 git commit -m fullname &&
19
20 git checkout people &&
21 git rm ring &&
22 echo gollum >owner &&
23 git add owner &&
24 test_tick &&
25 git commit -m track-people-instead-of-objects &&
26 echo "Myyy PRECIOUSSS" >ring
27'
28
29test_expect_failure "Does git preserve Gollum's precious artifact?" '
30 test_must_fail git merge -s recursive rename-the-ring &&
31
32 # Make sure git did not delete an untracked file
33 test -f ring
34'
35
36test_done