Skip to content

Commit 3ad710a

Browse files
Fix the GIT_USE_NSEC performance fix
There is a typo, Instead comparing nanoseconds to zero the code is comparing seconds to zero
1 parent 013d416 commit 3ad710a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ GIT_INLINE(bool) git_index_entry_newer_than_index(
111111
return true;
112112
else if ((int32_t)index->stamp.mtime.tv_sec > entry->mtime.seconds)
113113
return false;
114-
else if (entry->mtime.nanoseconds == 0 || index->stamp.mtime.tv_sec == 0)
114+
else if (entry->mtime.nanoseconds == 0 || index->stamp.mtime.tv_nsec == 0)
115115
return true;
116116
else
117117
return (uint32_t)index->stamp.mtime.tv_nsec <= entry->mtime.nanoseconds;

0 commit comments

Comments
 (0)