Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/index.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ GIT_INLINE(bool) git_index_time_eq(const git_index_time *one, const git_index_ti
return false;

#ifdef GIT_USE_NSEC
if (one->nanoseconds == 0 || two->nanoseconds == 0)
return true;
if (one->nanoseconds != two->nanoseconds)
return false;
#endif
Expand All @@ -109,6 +111,8 @@ 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)
return true;
else
return (uint32_t)index->stamp.mtime.tv_nsec <= entry->mtime.nanoseconds;
#else
Expand Down