summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c297432)
raw | patch | inline | side by side (parent: c297432)
author | Junio C Hamano <gitster@pobox.com> | |
Tue, 29 Jul 2008 05:27:39 +0000 (22:27 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 29 Jul 2008 06:02:12 +0000 (23:02 -0700) |
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>
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>
t/t7001-mv.sh | patch | blob | history |
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index b0fa407825b4b8d0df264c0127bb20093415a3ed..910a28c7e29b6dd8bd30d1ccb156681b44e51bca 100755 (executable)
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
! test -e moved &&
test -f symlink &&
test "$(cat symlink)" = 1 &&
+ git update-index --refresh &&
git diff-files --quiet
'
git mv -f symlink moved &&
! test -e symlink &&
test -h moved &&
+ git update-index --refresh &&
git diff-files --quiet
'