From 3ad710a34524ac400fd14f59a50af81ca334abba Mon Sep 17 00:00:00 2001 From: Julian Mesa Date: Thu, 26 May 2022 15:52:32 +0200 Subject: [PATCH] Fix the GIT_USE_NSEC performance fix There is a typo, Instead comparing nanoseconds to zero the code is comparing seconds to zero --- src/index.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.h b/src/index.h index 40e1f005549..f6f813d9162 100644 --- a/src/index.h +++ b/src/index.h @@ -111,7 +111,7 @@ GIT_INLINE(bool) git_index_entry_newer_than_index( return true; else if ((int32_t)index->stamp.mtime.tv_sec > entry->mtime.seconds) return false; - else if (entry->mtime.nanoseconds == 0 || index->stamp.mtime.tv_sec == 0) + else if (entry->mtime.nanoseconds == 0 || index->stamp.mtime.tv_nsec == 0) return true; else return (uint32_t)index->stamp.mtime.tv_nsec <= entry->mtime.nanoseconds;