author | Kjetil Barvik <barvik@broadpark.no> | |
Wed, 4 Mar 2009 17:47:40 +0000 (18:47 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sun, 8 Mar 2009 04:25:16 +0000 (20:25 -0800) | ||
commit | c06ff4908bf9ad8bf2448439a3574321c9399b17 | |
tree | 269f1fcbb4c60ceeccdc4dcf1f270d1f3f72d977 | tree | snapshot |
parent | e1afca4fd3e7cb4000874e991277f10119de4ad2 | commit | diff |
Record ns-timestamps if possible, but do not use it without USE_NSEC
Traditionally, the lack of USE_NSEC meant "do not record nor use the
nanosecond resolution part of the file timestamps". To avoid problems on
filesystems that lose the ns part when the metadata is flushed to the disk
and then later read back in, disabling USE_NSEC has been a good idea in
general.
If you are on a filesystem without such an issue, it does not hurt to read
and store them in the cached stat data in the index entries even if your
git is compiled without USE_NSEC. The index left with such a version of
git can be read by git compiled with USE_NSEC and it can make use of the
nanosecond part to optimize the check to see if the path on the filesystem
hsa been modified since we last looked at.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Traditionally, the lack of USE_NSEC meant "do not record nor use the
nanosecond resolution part of the file timestamps". To avoid problems on
filesystems that lose the ns part when the metadata is flushed to the disk
and then later read back in, disabling USE_NSEC has been a good idea in
general.
If you are on a filesystem without such an issue, it does not hurt to read
and store them in the cached stat data in the index entries even if your
git is compiled without USE_NSEC. The index left with such a version of
git can be read by git compiled with USE_NSEC and it can make use of the
nanosecond part to optimize the check to see if the path on the filesystem
hsa been modified since we last looked at.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Makefile | diff | blob | history | |
builtin-fetch-pack.c | diff | blob | history | |
git-compat-util.h | diff | blob | history | |
read-cache.c | diff | blob | history | |
unpack-trees.c | diff | blob | history |