mirror of
https://github.com/git/git.git
synced 2024-11-24 10:26:17 +08:00
dc76852df2
This one is tricky. When `core.fsmonitor` is set, a `refresh_index()` will not perform a full scan of files that might be modified, but will query the fsmonitor and refresh only the ones that have been actually touched. Due to implementation details, the fsmonitor is queried in `refresh_cache_ent()`, but of course it only has to be queried once, so we set a flag when we did that. But when the index was discarded, we did not re-set that flag. So far, this is only covered by our test suite when running with GIT_TEST_FSMONITOR=$PWD/t7519/fsmonitor-all, and only due to the way the built-in stash interacts with the recursive merge machinery. Let's introduce a straight-forward regression test for this. We simply extend the "read & discard index" loop in `test-tool read-cache` to optionally refresh the index, report on a given file's status, and then modify that file. Due to the bug described above, only the first refresh will actually query the fsmonitor; subsequent loop iterations will not. This problem was reported by Ævar Arnfjörð Bjarmason. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> |
||
---|---|---|
.. | ||
.gitignore | ||
test-chmtime.c | ||
test-config.c | ||
test-ctype.c | ||
test-date.c | ||
test-delta.c | ||
test-drop-caches.c | ||
test-dump-cache-tree.c | ||
test-dump-fsmonitor.c | ||
test-dump-split-index.c | ||
test-dump-untracked-cache.c | ||
test-example-decorate.c | ||
test-fake-ssh.c | ||
test-genrandom.c | ||
test-genzeros.c | ||
test-hash-speed.c | ||
test-hash.c | ||
test-hashmap.c | ||
test-index-version.c | ||
test-json-writer.c | ||
test-lazy-init-name-hash.c | ||
test-line-buffer.c | ||
test-match-trees.c | ||
test-mergesort.c | ||
test-mktemp.c | ||
test-online-cpus.c | ||
test-parse-options.c | ||
test-path-utils.c | ||
test-pkt-line.c | ||
test-prio-queue.c | ||
test-reach.c | ||
test-read-cache.c | ||
test-read-midx.c | ||
test-ref-store.c | ||
test-regex.c | ||
test-repository.c | ||
test-revision-walking.c | ||
test-run-command.c | ||
test-scrap-cache-tree.c | ||
test-sha1-array.c | ||
test-sha1.c | ||
test-sha1.sh | ||
test-sha256.c | ||
test-sigchain.c | ||
test-strcmp-offset.c | ||
test-string-list.c | ||
test-submodule-config.c | ||
test-submodule-nested-repo-config.c | ||
test-subprocess.c | ||
test-svn-fe.c | ||
test-tool.c | ||
test-tool.h | ||
test-urlmatch-normalization.c | ||
test-wildmatch.c | ||
test-windows-named-pipe.c | ||
test-write-cache.c | ||
test-xml-encode.c |