3 test_description
='rerere run in a workdir'
6 test_expect_success SYMLINKS setup
'
7 git config rerere.enabled true &&
11 git commit -m initial &&
15 git commit -a -m hello &&
17 git checkout -b side HEAD^ &&
18 echo goodbye >world &&
20 git commit -a -m goodbye &&
25 test_expect_success SYMLINKS
'rerere in workdir' '
26 rm -rf .git/rr-cache &&
27 "$SHELL_PATH" "$TEST_DIRECTORY/../contrib/workdir/git-new-workdir" . work &&
30 test_must_fail git merge side &&
31 git rerere status >actual &&
33 test_cmp expect actual
37 # This fails because we don't resolve relative symlink in mkdir_in_gitdir()
38 # For the purpose of helping contrib/workdir/git-new-workdir users, we do not
39 # have to support relative symlinks, but it might be nicer to make this work
40 # with a relative symbolic link someday.
41 test_expect_failure SYMLINKS
'rerere in workdir (relative)' '
42 rm -rf .git/rr-cache &&
43 "$SHELL_PATH" "$TEST_DIRECTORY/../contrib/workdir/git-new-workdir" . krow &&
46 rm -f .git/rr-cache &&
47 ln -s ../.git/rr-cache .git/rr-cache &&
48 test_must_fail git merge side &&
49 git rerere status >actual &&
51 test_cmp expect actual