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

[PATCH v2 1/2] t1503: test rev-parse --verify --quiet with deleted reflogs

From
David Aguilar <davvid@gmail.com>
Date
Sep 14, 2014, 19:03 UTC
Message-ID
<1410721382-97751-1-git-send-email-davvid@gmail.com>

Ensure that rev-parse --verify --quiet is silent when asked about deleted reflog entries.

Helped-by: Fabian Ruch <bafain@gmail.com>
Signed-off-by: David Aguilar <davvid@gmail.com>
---
Changes since last time:

Use "git branch test" instead of low-level plumbing commands. Capture both stdout and stderr in the test.

 t/t1503-rev-parse-verify.sh | 7 +++++++
 1 file changed, 7 insertions(+)
diff --git a/t/t1503-rev-parse-verify.sh b/t/t1503-rev-parse-verify.sh
index 813cc1b..ab9878d 100755
--- a/t/t1503-rev-parse-verify.sh
+++ b/t/t1503-rev-parse-verify.sh
@@ -83,6 +83,13 @@ test_expect_success 'fails silently when using -q' '
 	test -z "$(cat error)"
 '
 
+test_expect_success 'fails silently when using -q with deleted reflogs' '
+	git branch test &&
+	git reflog delete --updateref --rewrite test@{0} &&
+	test_must_fail git rev-parse -q --verify test@{0} >error 2>&1 &&
+	test -z "$(cat error)"
+'
+
 test_expect_success 'no stdout output on error' '
 	test -z "$(git rev-parse --verify)" &&
 	test -z "$(git rev-parse --verify foo)" &&
-- 
2.1.0.30.g05c535b.dirty
Next: David Aguilar
Message 1 of 2 in “t1503: test rev-parse --verify --quiet with deleted reflogs”
  1. 1/2 t1503: test rev-parse --verify --quiet with deleted reflogsDavid Aguilar, Sep 14, 2014
  2. 2/2 t1503: use test_must_be_emptyDavid Aguilar, Sep 14, 2014

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.