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

[PATCH 1/3] t6501: use --quiet when testing gc stderr

From
Derrick Stolee via GitGitGadget <gitgitgadget@gmail.com>
Date
Oct 17, 2018, 20:33 UTC
Message-ID
<ab118e60e9988076edf43d0ed8c1924e6569a9d0.1539808389.git.gitgitgadget@gmail.com>
In-Reply-To
<pull.50.git.gitgitgadget@gmail.com>
From: Derrick Stolee <dstolee@microsoft.com>

The test script t6501-freshen-objects.sh has some tests that care if 'git gc' has any output to stderr. This is intended to say that no warnings occurred related to broken links. However, when we have operations that output progress (like writing the commit-graph) this causes the test to fail.

Use 'git gc --quiet' to avoid these progress indicators from causing a test failure.

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
---
 t/t6501-freshen-objects.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/t/t6501-freshen-objects.sh b/t/t6501-freshen-objects.sh
index 033871ee5f..0973130f06 100755
--- a/t/t6501-freshen-objects.sh
+++ b/t/t6501-freshen-objects.sh
@@ -137,7 +137,7 @@ test_expect_success 'do not complain about existing broken links (commit)' '
 	some message
 	EOF
 	commit=$(git hash-object -t commit -w broken-commit) &&
-	git gc 2>stderr &&
+	git gc --quiet 2>stderr &&
 	verbose git cat-file -e $commit &&
 	test_must_be_empty stderr
 '
@@ -147,7 +147,7 @@ test_expect_success 'do not complain about existing broken links (tree)' '
 	100644 blob 0000000000000000000000000000000000000003	foo
 	EOF
 	tree=$(git mktree --missing <broken-tree) &&
-	git gc 2>stderr &&
+	git gc --quiet 2>stderr &&
 	git cat-file -e $tree &&
 	test_must_be_empty stderr
 '
@@ -162,7 +162,7 @@ test_expect_success 'do not complain about existing broken links (tag)' '
 	this is a broken tag
 	EOF
 	tag=$(git hash-object -t tag -w broken-tag) &&
-	git gc 2>stderr &&
+	git gc --quiet 2>stderr &&
 	git cat-file -e $tag &&
 	test_must_be_empty stderr
 '
-- 
gitgitgadget
Previous: Derrick Stolee via GitGitGadgetNext: Junio C Hamano
Message 2 of 9 in “Use commit-graph by default”
  1. 0/3 Use commit-graph by defaultDerrick Stolee via GitGitGadget, Oct 17, 2018
  2. 1/3 t6501: use --quiet when testing gc stderrDerrick Stolee via GitGitGadget, Oct 17, 2018
  3. Junio C HamanoOct 18, 2018
  4. Derrick StoleeOct 18, 2018
  5. Junio C HamanoOct 19, 2018
  6. 2/3 t: explicitly turn off core.commitGraph as neededDerrick Stolee via GitGitGadget, Oct 17, 2018
  7. 3/3 commit-graph: Use commit-graph by defaultDerrick Stolee via GitGitGadget, Oct 17, 2018
  8. Junio C HamanoOct 18, 2018
  9. Derrick StoleeOct 18, 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.