summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAxel Rasmussen <axelrasmussen@google.com>2015-10-01 18:35:21 -0700
committerAxel Rasmussen <axelrasmussen@google.com>2015-10-01 18:35:21 -0700
commit973a09a4ca6502e45826ec310aabf931c48f196e (patch)
tree7106f882375a17c9ea45e32a29c095b48472a7e1
parentc7b17fb5cd1adac57c4300e95cef8c7064b0601a (diff)
downloadlibgit2-973a09a4ca6502e45826ec310aabf931c48f196e.tar.gz
index: don't populate nsec values if GIT_USE_NSEC is off
-rw-r--r--src/fileops.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/fileops.c b/src/fileops.c
index 5b54298fa..a13a40655 100644
--- a/src/fileops.c
+++ b/src/fileops.c
@@ -1081,6 +1081,9 @@ void git_futils_filestamp_set_from_stat(
if (st) {
stamp->mtime = *statmtime;
+#if !defined(GIT_USE_NSEC)
+ stamp->mtime.tv_nsec = 0;
+#endif
stamp->size = (git_off_t)st->st_size;
stamp->ino = (unsigned int)st->st_ino;
} else {