Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSZEDER Gábor <szeder.dev@gmail.com>2019-11-25 15:59:07 +0300
committerJunio C Hamano <gitster@pobox.com>2019-11-27 04:47:23 +0300
commitfc42f20e243db941fb58e5ef43e3654034738326 (patch)
tree3e38e8b3fa9d95ec252254b6832d0acd54a5a8db /t/test-lib-functions.sh
parent5fa0f5238b0cd46cfe7f6fa76c3f526ea98148d9 (diff)
test-lib-functions: suppress a 'git rev-parse' error in 'test_commit_bulk'
When 'test_commit_bulk' is invoked in an empty test repository, it prints a "fatal: Needed a single revision" error, but still does what it's supposed to do. A test helper function displaying a fatal error and still succeeding is always suspect to be buggy, but luckily that's not the case here: that error comes from a 'git rev-parse --verify HEAD' command invoked in a condition, which doesn't have anything to verify in an empty repository. Use the '--quiet' option to suppress that error message. Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com> Acked-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/test-lib-functions.sh')
-rw-r--r--t/test-lib-functions.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/t/test-lib-functions.sh b/t/test-lib-functions.sh
index e0b3f28d3a..a2e9d6ae2e 100644
--- a/t/test-lib-functions.sh
+++ b/t/test-lib-functions.sh
@@ -306,7 +306,7 @@ test_commit_bulk () {
total=$1
add_from=
- if git -C "$indir" rev-parse --verify "$ref"
+ if git -C "$indir" rev-parse --quiet --verify "$ref"
then
add_from=t
fi