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

Helped-by: Fabian Ruch <[email protected]>
Signed-off-by: David Aguilar <[email protected]>
---
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

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to