summaryrefslogtreecommitdiff
path: root/unpack-trees.c
diff options
context:
space:
mode:
authorKjetil Barvik <barvik@broadpark.no>2009-03-04 18:47:40 +0100
committerJunio C Hamano <gitster@pobox.com>2009-03-07 20:25:16 -0800
commitc06ff4908bf9ad8bf2448439a3574321c9399b17 (patch)
tree269f1fcbb4c60ceeccdc4dcf1f270d1f3f72d977 /unpack-trees.c
parente1afca4fd3e7cb4000874e991277f10119de4ad2 (diff)
downloadgit-c06ff4908bf9ad8bf2448439a3574321c9399b17.tar.gz
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>
Diffstat (limited to 'unpack-trees.c')
-rw-r--r--unpack-trees.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/unpack-trees.c b/unpack-trees.c
index 9fe0cd5f9b..da2e3c0915 100644
--- a/unpack-trees.c
+++ b/unpack-trees.c
@@ -362,9 +362,7 @@ int unpack_trees(unsigned len, struct tree_desc *t, struct unpack_trees_options
o->result.initialized = 1;
if (o->src_index) {
o->result.timestamp.sec = o->src_index->timestamp.sec;
-#ifdef USE_NSEC
o->result.timestamp.nsec = o->src_index->timestamp.nsec;
-#endif
}
o->merge_size = len;