From: "Tao Klerks via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: Tao Klerks <tao@klerks.biz>, Tao Klerks <tao@klerks.biz>
Subject: [PATCH 2/3] In t7519, populate untracked cache before test
Date: Thu, 24 Jun 2021 18:30:00 +0000 [thread overview]
Message-ID: <d63faad03a4bc41ea778bc4dd61c320e09424cd9.1624559402.git.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.986.git.1624559401.gitgitgadget@gmail.com>
From: Tao Klerks <tao@klerks.biz>
In its current state, the t7519 test dealing with untracked
cache assumes that
"git update-index --untracked-cache" will *populate*
the untracked cache. This is not correct - it will only add
an empty untracked cache structure to the index.
If we're going to compare two git status runs with
something interesting happening in-between, we
need to ensure that the index is in a stable/steady
state *before* that first run.
We achieve this by adding another prior "git status"
run.
At this stage this change does nothing, because there
is a bug, addressed in the next patch. whereby once
the empty untracked cache structure is added by the
update-index invocation, the untracked cache gets
updated in every subsequent "git status" call, but the
index with these updates does not get written down.
That bug actually invalidates this entire test case -
but we're fixing that next.
Signed-off-by: Tao Klerks <tao@klerks.biz>
---
t/t7519-status-fsmonitor.sh | 1 +
1 file changed, 1 insertion(+)
diff --git a/t/t7519-status-fsmonitor.sh b/t/t7519-status-fsmonitor.sh
index 1209fa93499..ef75c548d90 100755
--- a/t/t7519-status-fsmonitor.sh
+++ b/t/t7519-status-fsmonitor.sh
@@ -339,6 +339,7 @@ test_expect_success UNTRACKED_CACHE 'ignore .git changes when invalidating UNTR'
avoid_racy &&
git update-index --untracked-cache &&
git update-index --fsmonitor &&
+ git status &&
GIT_TRACE2_PERF="$TRASH_DIRECTORY/trace-before" \
git status &&
test-tool dump-untracked-cache >../before
--
gitgitgadget
next prev parent reply other threads:[~2021-06-24 18:30 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-24 18:29 [PATCH 0/3] Empty untracked cache performance issue Tao Klerks via GitGitGadget
2021-06-24 18:29 ` [PATCH 1/3] Add a second's delay to t7519 for untracked cache Tao Klerks via GitGitGadget
2021-06-29 4:22 ` Junio C Hamano
2021-06-24 18:30 ` Tao Klerks via GitGitGadget [this message]
2021-06-24 18:30 ` [PATCH 3/3] Write index when populating empty " Tao Klerks via GitGitGadget
2021-06-29 4:42 ` Junio C Hamano
2022-02-24 17:52 ` Tao Klerks
2022-02-24 20:35 ` Junio C Hamano
2022-02-25 17:10 ` [PATCH v2 0/3] Empty untracked cache performance issue Tao Klerks via GitGitGadget
2022-02-25 17:10 ` [PATCH v2 1/3] t7519: avoid file to index mtime race for untracked cache Tao Klerks via GitGitGadget
2022-02-25 19:07 ` Junio C Hamano
2022-02-27 22:12 ` Tao Klerks
2022-02-25 17:10 ` [PATCH v2 2/3] t7519: populate untracked cache before test Tao Klerks via GitGitGadget
2022-02-25 17:10 ` [PATCH v2 3/3] untracked-cache: write index when populating empty untracked cache Tao Klerks via GitGitGadget
2022-02-25 19:12 ` Junio C Hamano
2022-02-27 21:56 ` [PATCH v3 0/3] Empty untracked cache performance issue Tao Klerks via GitGitGadget
2022-02-27 21:56 ` [PATCH v3 1/3] t7519: avoid file to index mtime race for untracked cache Tao Klerks via GitGitGadget
2022-02-27 21:57 ` [PATCH v3 2/3] t7519: populate untracked cache before test Tao Klerks via GitGitGadget
2022-02-27 21:57 ` [PATCH v3 3/3] untracked-cache: write index when populating empty untracked cache Tao Klerks via GitGitGadget
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d63faad03a4bc41ea778bc4dd61c320e09424cd9.1624559402.git.gitgitgadget@gmail.com \
--to=gitgitgadget@gmail.com \
--cc=git@vger.kernel.org \
--cc=tao@klerks.biz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).