Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6abdf52

Browse files
author
Edward Thomson
committed
merge::workdir::dirty: update to use st_ctime_nsec
Update unit test to use newfangled `st_ctime_nsec`, which provides indirection to the platform-correct name.
1 parent 2d88071 commit 6abdf52

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/merge/workdir/dirty.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,8 @@ static void hack_index(char *files[])
165165
entry->ctime.seconds = (int32_t)statbuf.st_ctime;
166166
entry->mtime.seconds = (int32_t)statbuf.st_mtime;
167167
#if defined(GIT_USE_NSEC)
168-
entry->ctime.nanoseconds = statbuf.st_ctim.tv_nsec;
169-
entry->mtime.nanoseconds = statbuf.st_mtim.tv_nsec;
168+
entry->ctime.nanoseconds = statbuf.st_ctime_nsec;
169+
entry->mtime.nanoseconds = statbuf.st_mtime_nsec;
170170
#else
171171
entry->ctime.nanoseconds = 0;
172172
entry->mtime.nanoseconds = 0;

0 commit comments

Comments
 (0)