summaryrefslogtreecommitdiff
path: root/t/t4122-apply-symlink-inside.sh
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2007-05-10 23:44:53 -0700
committerJunio C Hamano <junkio@cox.net>2007-05-11 22:33:31 -0700
commit16a4c6176ad096881d0021f1a922fbcc2835f799 (patch)
tree14719b93b49e50f6566a3f60a8e6299a05017901 /t/t4122-apply-symlink-inside.sh
parent64cab59159d1308365d56e218a10bfc0d3cd0fd0 (diff)
downloadgit-16a4c6176ad096881d0021f1a922fbcc2835f799.tar.gz
read-tree -m -u: avoid getting confused by intermediate symlinks.
When switching from a branch with both x86_64/boot/Makefile and i386/boot/Makefile to another branch that has x86_64/boot as a symlink pointing at ../i386/boot, the code incorrectly removed i386/boot/Makefile. This was because we first removed everything under x86_64/boot to make room to create a symbolic link x86_64/boot, then removed x86_64/boot/Makefile which no longer exists but now is pointing at i386/boot/Makefile, thanks to the symlink we just created. This fixes it by using the has_symlink_leading_path() function introduced previously for git-apply in the checkout codepath. Earlier, "git checkout" was broken in t4122 test due to this bug, and the test had an extra "git reset --hard" as a workaround, which is removed because it is not needed anymore. Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 't/t4122-apply-symlink-inside.sh')
-rwxr-xr-xt/t4122-apply-symlink-inside.sh1
1 files changed, 0 insertions, 1 deletions
diff --git a/t/t4122-apply-symlink-inside.sh b/t/t4122-apply-symlink-inside.sh
index 37c9a9f254..3ddfe64b02 100755
--- a/t/t4122-apply-symlink-inside.sh
+++ b/t/t4122-apply-symlink-inside.sh
@@ -34,7 +34,6 @@ test_expect_success setup '
test_expect_success apply '
git checkout test &&
- git reset --hard && #### checkout seems to be buggy
git diff --exit-code test &&
git diff --exit-code --cached test &&
git apply --index test.patch