summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-07-29 05:27:39 (GMT)
committerJunio C Hamano <gitster@pobox.com>2008-07-29 06:02:12 (GMT)
commit65c35b2256ecbfaebcf04559fe6070807646afff (patch)
tree3df48808efc80074faead617362ca9680302d433 /t
parentc297432d0d245af5505e0f5f99a5267119dd421e (diff)
downloadgit-65c35b2256ecbfaebcf04559fe6070807646afff.zip
git-65c35b2256ecbfaebcf04559fe6070807646afff.tar.gz
git-65c35b2256ecbfaebcf04559fe6070807646afff.tar.bz2
t7001: fix "git mv" test
The test assumed that we can keep the cached stat information fresh across rename(2); many filesystems however update st_ctime (and POSIX allows them to do so), and that assumption does not hold. We can explicitly refresh the index for the purpose of these tests. The only thing we are interested in is the staged contents and the mode bits are preserved across "git mv". Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-xt/t7001-mv.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index b0fa407..910a28c 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -185,6 +185,7 @@ test_expect_success 'git mv should overwrite symlink to a file' '
! test -e moved &&
test -f symlink &&
test "$(cat symlink)" = 1 &&
+ git update-index --refresh &&
git diff-files --quiet
'
@@ -202,6 +203,7 @@ test_expect_success 'git mv should overwrite file with a symlink' '
git mv -f symlink moved &&
! test -e symlink &&
test -h moved &&
+ git update-index --refresh &&
git diff-files --quiet
'