| test_description='rerere run in a workdir' |
| GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main |
| export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME |
| test_expect_success SYMLINKS setup ' |
| git config rerere.enabled true && |
| git commit -a -m hello && |
| git checkout -b side HEAD^ && |
| git commit -a -m goodbye && |
| test_expect_success SYMLINKS 'rerere in workdir' ' |
| "$SHELL_PATH" "$TEST_DIRECTORY/../contrib/workdir/git-new-workdir" . work && |
| test_must_fail git merge side && |
| git rerere status >actual && |
| # This fails because we don't resolve relative symlink in mkdir_in_gitdir() |
| # For the purpose of helping contrib/workdir/git-new-workdir users, we do not |
| # have to support relative symlinks, but it might be nicer to make this work |
| # with a relative symbolic link someday. |
| test_expect_failure SYMLINKS 'rerere in workdir (relative)' ' |
| "$SHELL_PATH" "$TEST_DIRECTORY/../contrib/workdir/git-new-workdir" . krow && |
| ln -s ../.git/rr-cache .git/rr-cache && |
| test_must_fail git merge side && |
| git rerere status >actual && |