author | Brandon Casey <casey@nrlssc.navy.mil> | |
Thu, 14 Aug 2008 00:49:30 +0000 (19:49 -0500) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 14 Aug 2008 01:18:23 +0000 (18:18 -0700) | ||
commit | 21926fe885aa6579f7aa0e89fcb6a9064f8aa516 | |
tree | 904d286421f456f198978881d95a7e96f2982fd4 | tree | snapshot |
parent | ea335b56d44a92b9b8be40b1465d7df65a4f736b | commit | diff |
t5304-prune: adjust file mtime based on system time rather than file mtime
test-chmtime can adjust the mtime of a file based on the file's mtime, or
based on the system time. For files accessed over NFS, the file's mtime is
set by the NFS server, and as such may vary a great deal from the NFS
client's system time if the clocks of the client and server are out of
sync. Since these tests are testing the expire feature of git-prune, an
incorrect mtime could cause a file to be expired or not expired incorrectly
and produce a test failure.
Avoid this NFS pitfall by modifying the calls to test-chmtime so that the
mtime is adjusted based on the system time, rather than the file's mtime.
Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
test-chmtime can adjust the mtime of a file based on the file's mtime, or
based on the system time. For files accessed over NFS, the file's mtime is
set by the NFS server, and as such may vary a great deal from the NFS
client's system time if the clocks of the client and server are out of
sync. Since these tests are testing the expire feature of git-prune, an
incorrect mtime could cause a file to be expired or not expired incorrectly
and produce a test failure.
Avoid this NFS pitfall by modifying the calls to test-chmtime so that the
mtime is adjusted based on the system time, rather than the file's mtime.
Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t5304-prune.sh | diff | blob | history |