From: "Tao Klerks via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: "Tao Klerks" <tao@klerks.biz>,
"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
"Tao Klerks" <tao@klerks.biz>, "Tao Klerks" <tao@klerks.biz>
Subject: [PATCH v6 1/2] untracked-cache: test untracked-cache-bypassing behavior with -uall
Date: Thu, 31 Mar 2022 16:02:14 +0000 [thread overview]
Message-ID: <f27f018493afd56a1eacb2008a7284e9e262f73e.1648742535.git.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.985.v6.git.1648742535.gitgitgadget@gmail.com>
From: Tao Klerks <tao@klerks.biz>
Untracked cache was originally designed to only work with
'--untracked-files=normal', and it gets ignored when
'--untracked-files=all' is specified instead.
Add explicit tests for this known as-designed behavior.
Signed-off-by: Tao Klerks <tao@klerks.biz>
---
t/t7063-status-untracked-cache.sh | 32 +++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
diff --git a/t/t7063-status-untracked-cache.sh b/t/t7063-status-untracked-cache.sh
index ca90ee805e7..b89be8dc6d6 100755
--- a/t/t7063-status-untracked-cache.sh
+++ b/t/t7063-status-untracked-cache.sh
@@ -190,6 +190,38 @@ test_expect_success 'untracked cache after second status' '
test_cmp ../dump.expect ../actual
'
+cat >../status_uall.expect <<EOF &&
+A done/one
+A one
+A two
+?? dthree/three
+?? dtwo/two
+?? three
+EOF
+
+# Bypassing the untracked cache here is not desirable from an
+# end-user perspective, but is expected in the current design.
+# The untracked cache data stored for a -unormal run cannot be
+# correctly used in a -uall run - it would yield incorrect output.
+test_expect_success 'untracked cache is bypassed with -uall' '
+ : >../trace.output &&
+ GIT_TRACE2_PERF="$TRASH_DIRECTORY/trace.output" \
+ git status -uall --porcelain >../actual &&
+ iuc status -uall --porcelain >../status.iuc &&
+ test_cmp ../status_uall.expect ../status.iuc &&
+ test_cmp ../status_uall.expect ../actual &&
+ get_relevant_traces ../trace.output ../trace.relevant &&
+ cat >../trace.expect <<EOF &&
+ ....path:
+EOF
+ test_cmp ../trace.expect ../trace.relevant
+'
+
+test_expect_success 'untracked cache remains after bypass' '
+ test-tool dump-untracked-cache >../actual &&
+ test_cmp ../dump.expect ../actual
+'
+
test_expect_success 'modify in root directory, one dir invalidation' '
: >four &&
test-tool chmtime =-240 four &&
--
gitgitgadget
next prev parent reply other threads:[~2022-03-31 16:02 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-23 6:44 [PATCH] Support untracked cache with '--untracked-files=all' if configured Tao Klerks via GitGitGadget
2022-02-25 17:52 ` [PATCH v2] untracked-cache: support " Tao Klerks via GitGitGadget
2022-02-25 19:43 ` Junio C Hamano
2022-02-27 11:21 ` Tao Klerks
2022-02-27 19:54 ` Junio C Hamano
2022-02-27 11:22 ` [PATCH v3] " Tao Klerks via GitGitGadget
2022-02-27 14:39 ` Tao Klerks
2022-02-27 15:13 ` [PATCH v4] " Tao Klerks via GitGitGadget
2022-02-28 14:02 ` Ævar Arnfjörð Bjarmason
2022-03-02 8:47 ` Tao Klerks
2022-03-29 11:25 ` [PATCH v5 0/2] Support untracked cache with " Tao Klerks via GitGitGadget
2022-03-29 11:25 ` [PATCH v5 1/2] untracked-cache: test untracked-cache-bypassing behavior with -uall Tao Klerks via GitGitGadget
2022-03-29 16:51 ` Junio C Hamano
2022-03-30 4:46 ` Tao Klerks
2022-03-30 16:39 ` Junio C Hamano
2022-03-31 5:15 ` Tao Klerks
2022-03-29 11:25 ` [PATCH v5 2/2] untracked-cache: support '--untracked-files=all' if configured Tao Klerks via GitGitGadget
2022-03-29 17:43 ` Junio C Hamano
2022-03-30 19:59 ` Tao Klerks
2022-03-31 16:02 ` [PATCH v6 0/2] Support untracked cache with " Tao Klerks via GitGitGadget
2022-03-31 16:02 ` Tao Klerks via GitGitGadget [this message]
2022-03-31 16:02 ` [PATCH v6 2/2] untracked-cache: support " 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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f27f018493afd56a1eacb2008a7284e9e262f73e.1648742535.git.gitgitgadget@gmail.com \
--to=gitgitgadget@gmail.com \
--cc=avarab@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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).