From c06ff4908bf9ad8bf2448439a3574321c9399b17 Mon Sep 17 00:00:00 2001 From: Kjetil Barvik Date: Wed, 4 Mar 2009 18:47:40 +0100 Subject: 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 --- unpack-trees.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'unpack-trees.c') 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; -- cgit v1.2.1