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

[PATCH 1/5] t1700-split-index: drop unnecessary 'grep'

From
SZEDER Gábor <szeder.dev@gmail.com>
Date
Sep 6, 2018, 02:48 UTC
Message-ID
<20180906024810.8074-2-szeder.dev@gmail.com>
In-Reply-To
<20180906024810.8074-1-szeder.dev@gmail.com>

The test 'disable split index' in 't1700-split-index.sh' runs the following pipeline:

  cmd | grep <pattern> | sed s///

Drop that 'grep' from the pipeline, and let 'sed' take over its duties.

Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
---
 t/t1700-split-index.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/t/t1700-split-index.sh b/t/t1700-split-index.sh
index b3b4d83eaf..be22398a85 100755
--- a/t/t1700-split-index.sh
+++ b/t/t1700-split-index.sh
@@ -57,7 +57,7 @@ test_expect_success 'disable split index' '
 	EOF
 	test_cmp ls-files.expect ls-files.actual &&
 
-	BASE=$(test-tool dump-split-index .git/index | grep "^own" | sed "s/own/base/") &&
+	BASE=$(test-tool dump-split-index .git/index | sed -n "s/^own/base/p") &&
 	test-tool dump-split-index .git/index | sed "/^own/d" >actual &&
 	cat >expect <<-EOF &&
 	not a split index
-- 
2.19.0.rc0.188.g56c5ee2db1
Previous: SZEDER GáborNext: Junio C Hamano
Message 2 of 20 in “Fix the racy split index problem”
  1. 0/5 Fix the racy split index problemSZEDER Gábor, Sep 6, 2018
  2. 1/5 t1700-split-index: drop unnecessary 'grep'SZEDER Gábor, Sep 6, 2018
  3. Junio C HamanoSep 6, 2018
  4. Duy NguyenSep 8, 2018
  5. 2/5 t0090: disable GIT_TEST_SPLIT_INDEX for the test checking split indexSZEDER Gábor, Sep 6, 2018
  6. Ævar Arnfjörð BjarmasonSep 6, 2018
  7. 3/5 split index: add a test to demonstrate the racy split index problemSZEDER Gábor, Sep 6, 2018
  8. 4/5 t1700-split-index: date back files to avoid racy situationsSZEDER Gábor, Sep 6, 2018
  9. Ævar Arnfjörð BjarmasonSep 6, 2018
  10. SZEDER GáborSep 6, 2018
  11. Ævar Arnfjörð BjarmasonSep 6, 2018
  12. 5/5 split-index: smudge and add racily clean cache entries to split indexSZEDER Gábor, Sep 6, 2018
  13. Ævar Arnfjörð BjarmasonSep 6, 2018
  14. Ævar Arnfjörð BjarmasonSep 6, 2018
  15. SZEDER GáborSep 6, 2018
  16. Ævar Arnfjörð BjarmasonSep 6, 2018
  17. Ævar Arnfjörð BjarmasonSep 6, 2018
  18. SZEDER GáborSep 7, 2018
  19. Paul-Sebastian UngureanuSep 10, 2018
  20. Duy NguyenSep 8, 2018

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.