git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v5 1/2] untracked-cache: test untracked-cache-bypassing behavior with -uall

From
Tao Klerks via GitGitGadget <gitgitgadget@gmail.com>
Date
Mar 29, 2022, 11:25 UTC
Message-ID
<98a4d8f35c5abfcda5590f7e511f7b576000fd5a.1648553134.git.gitgitgadget@gmail.com>
In-Reply-To
<pull.985.v5.git.1648553134.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 behavior.
Signed-off-by: Tao Klerks <tao@klerks.biz>
---
 t/t7063-status-untracked-cache.sh | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)
diff --git a/t/t7063-status-untracked-cache.sh b/t/t7063-status-untracked-cache.sh
index ca90ee805e7..c44b70b96e4 100755
--- a/t/t7063-status-untracked-cache.sh
+++ b/t/t7063-status-untracked-cache.sh
@@ -190,6 +190,36 @@ 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, but it expected
+# in the current implementation
+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
Previous: Tao Klerks via GitGitGadgetNext: Junio C Hamano
Message 12 of 22 in “Support untracked cache with '--untracked-files=all' if configured”
  1. Support untracked cache with '--untracked-files=all' if configuredTao Klerks via GitGitGadget, Jun 23, 2021
  2. untracked-cache: support '--untracked-files=all' if configuredTao Klerks via GitGitGadget, Feb 25, 2022
  3. Junio C HamanoFeb 25, 2022
  4. Tao KlerksFeb 27, 2022
  5. Junio C HamanoFeb 27, 2022
  6. untracked-cache: support '--untracked-files=all' if configuredTao Klerks via GitGitGadget, Feb 27, 2022
  7. Tao KlerksFeb 27, 2022
  8. untracked-cache: support '--untracked-files=all' if configuredTao Klerks via GitGitGadget, Feb 27, 2022
  9. Ævar Arnfjörð BjarmasonFeb 28, 2022
  10. Tao KlerksMar 2, 2022
  11. 0/2 Support untracked cache with '--untracked-files=all' if configuredTao Klerks via GitGitGadget, Mar 29, 2022
  12. 1/2 untracked-cache: test untracked-cache-bypassing behavior with -uallTao Klerks via GitGitGadget, Mar 29, 2022
  13. Junio C HamanoMar 29, 2022
  14. Tao KlerksMar 30, 2022
  15. Junio C HamanoMar 30, 2022
  16. Tao KlerksMar 31, 2022
  17. 2/2 untracked-cache: support '--untracked-files=all' if configuredTao Klerks via GitGitGadget, Mar 29, 2022
  18. Junio C HamanoMar 29, 2022
  19. Tao KlerksMar 30, 2022
  20. 0/2 Support untracked cache with '--untracked-files=all' if configuredTao Klerks via GitGitGadget, Mar 31, 2022
  21. 1/2 untracked-cache: test untracked-cache-bypassing behavior with -uallTao Klerks via GitGitGadget, Mar 31, 2022
  22. 2/2 untracked-cache: support '--untracked-files=all' if configuredTao Klerks via GitGitGadget, Mar 31, 2022

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.