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

[PATCH 1/1] t7519-status-fsmonitor: improve comments

From
WGWilliam Baker via GitGitGadget <gitgitgadget@gmail.com>
Date
Oct 16, 2019, 19:35 UTC
Message-ID
<85ca71fadaa7390a32218d3a5553c83d60c06a7f.1571254547.git.gitgitgadget@gmail.com>
In-Reply-To
<pull.404.git.1571254547.gitgitgadget@gmail.com>
From: William Baker <William.Baker@microsoft.com>

The comments for the staging/unstaging test did not accurately describe the scenario being tested. It is not essential that the test files being staged/unstaged appear at the end of the index. All that is required is that the test files are not flagged with CE_FSMONITOR_VALID and have a position in the index greater than the number of entries in the index after unstaging.

The comment for this test has been updated to be more accurate with respect to the scenario that's being tested.

Signed-off-by: William Baker <William.Baker@microsoft.com>
---
 t/t7519-status-fsmonitor.sh | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/t/t7519-status-fsmonitor.sh b/t/t7519-status-fsmonitor.sh
index d8df990972..997d5fb349 100755
--- a/t/t7519-status-fsmonitor.sh
+++ b/t/t7519-status-fsmonitor.sh
@@ -354,9 +354,11 @@ test_expect_success 'discard_index() also discards fsmonitor info' '
 	test_cmp expect actual
 '
 
-# Test staging/unstaging files that appear at the end of the index.  Test
-# file names begin with 'z' so that they are sorted to the end of the index.
-test_expect_success 'status succeeds after staging/unstaging ' '
+# Test unstaging entries that:
+#  - Are not flagged with CE_FSMONITOR_VALID
+#  - Have a position in the index >= the number of entries present in the index
+#    after unstaging.
+test_expect_success 'status succeeds after staging/unstaging' '
 	test_create_repo fsmonitor-stage-unstage &&
 	(
 		cd fsmonitor-stage-unstage &&
-- 
gitgitgadget
Previous: William Baker via GitGitGadgetNext: William Baker
Message 2 of 4 in “t7519-status-fsmonitor: improve comments”
  1. 0/1 t7519-status-fsmonitor: improve commentsWilliam Baker via GitGitGadget, Oct 16, 2019
  2. 1/1 t7519-status-fsmonitor: improve commentsWilliam Baker via GitGitGadget, Oct 16, 2019
  3. William BakerOct 29, 2019
  4. Junio C HamanoOct 30, 2019

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.