diff options
author | Carlos Martín Nieto <cmn@dwim.me> | 2015-06-16 08:51:45 +0200 |
---|---|---|
committer | Carlos Martín Nieto <cmn@dwim.me> | 2015-06-16 08:51:45 +0200 |
commit | e44abe16bd20512c76331e6889f390e35993153a (patch) | |
tree | 8a36e5be8f9a2c32d65a77796b919bbfcf77da07 /tests/checkout/crlf.c | |
parent | c4e6ab5f23819c35dc0c1a0fd7f50e5a194f0d5a (diff) | |
download | libgit2-e44abe16bd20512c76331e6889f390e35993153a.tar.gz |
tests: tick the index when we count OID calculations
These tests want to test that we don't recalculate entries which match
the index already. This is however something we force when truncating
racily-clean entries.
Tick the index forward as we know that we don't perform the
modifications which the racily-clean code is trying to avoid.
Diffstat (limited to 'tests/checkout/crlf.c')
-rw-r--r-- | tests/checkout/crlf.c | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/tests/checkout/crlf.c b/tests/checkout/crlf.c index e0d94e79f..61459b3a4 100644 --- a/tests/checkout/crlf.c +++ b/tests/checkout/crlf.c @@ -32,25 +32,6 @@ void test_checkout_crlf__detect_crlf_autocrlf_false(void) check_file_contents("./crlf/all-crlf", ALL_CRLF_TEXT_RAW); } -static void tick_index(git_index *index) -{ - git_time_t ts; - struct timespec times[2]; - - cl_assert(index->on_disk); - cl_assert(git_index_path(index)); - - cl_git_pass(git_index_read(index, true)); - ts = index->stamp.mtime; - - times[0].tv_sec = UTIME_OMIT; /* dont' change the atime */ - times[0].tv_nsec = UTIME_OMIT; /* dont' change the atime */ - times[1].tv_sec = ts + 1; - times[1].tv_nsec = 0; - cl_git_pass(p_utimensat(AT_FDCWD, git_index_path(index), times, 0)); - cl_git_pass(git_index_read(index, true)); -} - void test_checkout_crlf__autocrlf_false_index_size_is_unfiltered_size(void) { git_index *index; |