summaryrefslogtreecommitdiff
path: root/src/diff.c
diff options
context:
space:
mode:
authorAxel Rasmussen <axelrasmussen@google.com>2015-06-01 13:43:54 -0600
committerAxel Rasmussen <axelrasmussen@google.com>2015-09-18 23:33:55 -0700
commite7de893ef899705f7b7e2d9894a7fda147b6d091 (patch)
tree6cc30bbed8a0c2935c634ab241395de83200c4eb /src/diff.c
parentcdef1fad366808e71e3cae3ffcbfca7111ce93a1 (diff)
downloadlibgit2-e7de893ef899705f7b7e2d9894a7fda147b6d091.tar.gz
cmake: add USE_NSEC, and only check nanosec m/ctime if enabled
Diffstat (limited to 'src/diff.c')
-rw-r--r--src/diff.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/diff.c b/src/diff.c
index d97dcd9d2..b2259c74d 100644
--- a/src/diff.c
+++ b/src/diff.c
@@ -835,7 +835,11 @@ static int maybe_modified(
*/
} else if (git_oid_iszero(&nitem->id) && new_is_workdir) {
bool use_ctime = ((diff->diffcaps & GIT_DIFFCAPS_TRUST_CTIME) != 0);
+#ifdef GIT_USE_NSEC
bool use_nanos = ((diff->diffcaps & GIT_DIFFCAPS_TRUST_NANOSECS) != 0);
+#else
+ bool use_nanos = false;
+#endif
git_index *index;
git_iterator_index(&index, info->new_iter);