Commit 973a09a4ca6502e45826ec310aabf931c48f196e

Axel Rasmussen 2015-10-01T18:35:21

index: don't populate nsec values if GIT_USE_NSEC is off

1
2
3
4
5
6
7
8
9
10
11
12
13
14
diff --git a/src/fileops.c b/src/fileops.c
index 5b54298..a13a406 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 {