git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] t1503: test rev-parse --verify --quiet with deleted reflogs
@ 2014-09-14  8:30 David Aguilar
  2014-09-14 16:20 ` Fabian Ruch
  0 siblings, 1 reply; 5+ messages in thread
From: David Aguilar @ 2014-09-14  8:30 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

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

Signed-off-by: David Aguilar <davvid@gmail.com>
---
This verifies and depends on "refs: make rev-parse --quiet actually quiet".

 t/t1503-rev-parse-verify.sh | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/t/t1503-rev-parse-verify.sh b/t/t1503-rev-parse-verify.sh
index 813cc1b..731c21c 100755
--- a/t/t1503-rev-parse-verify.sh
+++ b/t/t1503-rev-parse-verify.sh
@@ -83,6 +83,15 @@ test_expect_success 'fails silently when using -q' '
 	test -z "$(cat error)"
 '
 
+test_expect_success 'fails silently when using -q with deleted reflogs' '
+	ref=$(git rev-parse HEAD) &&
+	: >.git/logs/refs/test &&
+	git update-ref -m test refs/test "$ref" &&
+	git reflog delete --updateref --rewrite refs/test@{0} &&
+	test_must_fail git rev-parse --verify --quiet refs/test@{0} 2>error &&
+	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.29.gf6d9003.dirty

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-09-15 18:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-14  8:30 [PATCH] t1503: test rev-parse --verify --quiet with deleted reflogs David Aguilar
2014-09-14 16:20 ` Fabian Ruch
2014-09-14 18:54   ` David Aguilar
2014-09-15 18:17     ` Junio C Hamano
2014-09-15 18:25     ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).