git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 1/3] t1503: test rev-parse --verify --quiet with deleted reflogs
@ 2014-09-15 19:07 David Aguilar
  2014-09-15 19:07 ` [PATCH v3 2/3] t1503: use test_must_be_empty David Aguilar
  2014-09-15 22:32 ` [PATCH v3 1/3] t1503: test rev-parse --verify --quiet with deleted reflogs Junio C Hamano
  0 siblings, 2 replies; 7+ messages in thread
From: David Aguilar @ 2014-09-15 19:07 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git, Fabian Ruch

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>
---
Differences since last time:

This goes back to the original approach of using "git update-ref"
plumbing instead of "git branch" when testing deleted reflogs.

 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..fd9d0c3 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 "reflog message for refs/test" refs/test "$ref" &&
+	git reflog delete --updateref --rewrite refs/test@{0} &&
+	test_must_fail git rev-parse -q --verify refs/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

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

end of thread, other threads:[~2014-09-16  3:06 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-15 19:07 [PATCH v3 1/3] t1503: test rev-parse --verify --quiet with deleted reflogs David Aguilar
2014-09-15 19:07 ` [PATCH v3 2/3] t1503: use test_must_be_empty David Aguilar
2014-09-15 19:07   ` [PATCH v3 3/3] Documentation: a note about stdout for git rev-parse --verify --quiet David Aguilar
2014-09-15 22:34     ` Junio C Hamano
2014-09-15 22:33   ` [PATCH v3 2/3] t1503: use test_must_be_empty Junio C Hamano
2014-09-15 22:32 ` [PATCH v3 1/3] t1503: test rev-parse --verify --quiet with deleted reflogs Junio C Hamano
2014-09-16  3:06   ` David Aguilar

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).