diff options
| author | Carlos Martín Nieto <cmn@dwim.me> | 2015-06-17 14:34:10 +0200 |
|---|---|---|
| committer | Carlos Martín Nieto <cmn@dwim.me> | 2015-06-22 12:47:30 +0200 |
| commit | ff47537557f0ac1919e77c5cb21f36f2e98425de (patch) | |
| tree | b7164edbbc40fcdea677c1d178c1052e7b197ef0 /tests/status | |
| parent | e96a97f18e8f961c434e4fa4fc2c7d950480b9e9 (diff) | |
| download | libgit2-ff47537557f0ac1919e77c5cb21f36f2e98425de.tar.gz | |
diff: check files with the same or newer timestamps
When a file on the workdir has the same or a newer timestamp than the
index, we need to perform a full check of the contents, as the update of
the file may have happened just after we wrote the index.
The iterator changes are such that we can reach inside the workdir
iterator from the diff, though it may be better to have an accessor
instead of moving these structs into the header.
Diffstat (limited to 'tests/status')
| -rw-r--r-- | tests/status/worktree.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/status/worktree.c b/tests/status/worktree.c index 56f98a882..75c7b71b0 100644 --- a/tests/status/worktree.c +++ b/tests/status/worktree.c @@ -985,6 +985,8 @@ void test_status_worktree__update_stat_cache_0(void) opts.flags &= ~GIT_STATUS_OPT_UPDATE_INDEX; + /* tick again as the index updating from the previous diff might have reset the timestamp */ + tick_index(index); cl_git_pass(git_status_list_new(&status, repo, &opts)); check_status0(status); cl_git_pass(git_status_list_get_perfdata(&perf, status)); |
