Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Include some nanosecond handling fixes for Android NDK's
struct stat
, which uses neitherst_mtim
norst_mtimespec
to contain astruct timespec
, and instead simply lays down anst_mtime_nsec
field next tost_mtime
.Move us over to using that by default, and then setting:
for compatibility with saner platforms. This is akin to the backcompat behavior with
st_mtime
and so should seem relatively normal everywhere.Also, fix a unit test that assumed that it would not be run in a
USE_NSECS=ON
environment: it validated that when writing a new index entry that the nanoseconds would be truncated and thus0
. (It was meant to ensure that we did not propagate old nanosecond entries that git.git wrote. We should, of course, validate that we write our own values when we're running with nanoseconds enabled.)