Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAxel Rasmussen <axelrasmussen@google.com>2015-08-29 23:59:20 +0300
committerAxel Rasmussen <axelrasmussen@google.com>2015-09-19 09:33:56 +0300
commit0226f7dd36c990e9bc1632adbc655fefc797513a (patch)
tree7077e9792dc75e9b7d74813914e2fe08010a8d0d /tests/checkout
parent360dd4dafd30bced1dab1d516765e347d09b91ba (diff)
diff/index: respect USE_NSEC for racily clean file detection
Diffstat (limited to 'tests/checkout')
-rw-r--r--tests/checkout/checkout_helpers.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/checkout/checkout_helpers.c b/tests/checkout/checkout_helpers.c
index 92a454d12..fb2f415e7 100644
--- a/tests/checkout/checkout_helpers.c
+++ b/tests/checkout/checkout_helpers.c
@@ -132,7 +132,7 @@ int checkout_count_callback(
void tick_index(git_index *index)
{
- git_time_t ts;
+ struct timespec ts;
struct timeval times[2];
cl_assert(index->on_disk);
@@ -141,10 +141,10 @@ void tick_index(git_index *index)
cl_git_pass(git_index_read(index, true));
ts = index->stamp.mtime;
- times[0].tv_sec = ts;
- times[0].tv_usec = 0;
- times[1].tv_sec = ts + 5;
- times[1].tv_usec = 0;
+ times[0].tv_sec = ts.tv_sec;
+ times[0].tv_usec = ts.tv_nsec / 1000;
+ times[1].tv_sec = ts.tv_sec + 5;
+ times[1].tv_usec = ts.tv_nsec / 1000;
cl_git_pass(p_utimes(git_index_path(index), times));
cl_git_pass(git_index_read(index, true));