From patchwork Mon Nov 25 12:59:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?SZEDER_G=C3=A1bor?= X-Patchwork-Id: 11260363 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BC47D930 for ; Mon, 25 Nov 2019 12:59:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9C3442053B for ; Mon, 25 Nov 2019 12:59:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="RWtfrJ0s" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726926AbfKYM7P (ORCPT ); Mon, 25 Nov 2019 07:59:15 -0500 Received: from mail-wr1-f47.google.com ([209.85.221.47]:42743 "EHLO mail-wr1-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725823AbfKYM7P (ORCPT ); Mon, 25 Nov 2019 07:59:15 -0500 Received: by mail-wr1-f47.google.com with SMTP id a15so17913326wrf.9 for ; Mon, 25 Nov 2019 04:59:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=xnmuCf3GiT/ZLc0vcfxDQZVDEjcfFInmvNwtVxL712U=; b=RWtfrJ0s4N89qTJTaF4GXrWuUEi9jXayxlEC5WSVNM3/qdxy3kpDg5PYEgqSIzirR7 6HTQ6PkNjDjT9hsxRvzRDTx51wGroDD/5SxKNJ342lFdKMzJnZ83aZXutJdjVe9R49NE xXJLsdC3MrkYDwp/k905nIAbqaa61sdL8UAfu0eGl0lLJjWjHrJY/tfn2WPhN3ocmFPK H4ZUlnOKlQiet2ShPzy/ZfRIwaVIR/9sSdbU1UhH8e9/x51o0jf5jssjnoJLJftJxOi/ lnrfOnrv3nWjTfw0V+SAGcEa5QEPV0kS1IDdlTlFzpPrjOUCOygD2FzrFg3Tw6pPA1MA 6tCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=xnmuCf3GiT/ZLc0vcfxDQZVDEjcfFInmvNwtVxL712U=; b=SJsU3VODhR64Jw4qahpAxuh+XRkJDosjqiUjBk20vl1fB4WO3YZz/y8zP05+tlMIyy m2+fL6YQVzmp95UR3aZgqpdLPp+bZ6V8Ndxr1IbA4rWqfIA3yYMaSdHw9e6M561Q85yw dlEVY2bpVZpukdAvjAiJPKnSBwnsbrFxJ+2TNr3IeEWkQSKQFKlwY5Xuq5N4FpK5u3Yk UDnp1nu3C0yTDHhbXy6uN6rLMrN3/jst6DqCWoLPWgfucsHdHQturxcse0IST6qpdwVc UoWrAzNBLfuSrreTjeuSL05XumFeovM/nxmjb9KjBuF5DGCCzW5HDEhjojtSbgf6k9m4 t1+Q== X-Gm-Message-State: APjAAAV8e6R1/3wbF/X6X5XQ7v8fL2aiNHDvI0Y5aHHiCa2usFa5WUut curhBiezgZ8yzkXiNioau68= X-Google-Smtp-Source: APXvYqzuJNHTRPkOWqG5YFyDNc9HLVQ26n/e0vRdhKixd3SnH/8Mwzhg1RbHeh3XBWIRnxFK1dmtvQ== X-Received: by 2002:a05:6000:104c:: with SMTP id c12mr2352573wrx.212.1574686751645; Mon, 25 Nov 2019 04:59:11 -0800 (PST) Received: from localhost.localdomain (x4d0c37f4.dyn.telefonica.de. [77.12.55.244]) by smtp.gmail.com with ESMTPSA id r2sm10268390wrm.71.2019.11.25.04.59.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 25 Nov 2019 04:59:10 -0800 (PST) From: =?utf-8?q?SZEDER_G=C3=A1bor?= To: Junio C Hamano Cc: Jeff King , git@vger.kernel.org, =?utf-8?q?SZEDER_G=C3=A1?= =?utf-8?q?bor?= Subject: [PATCH] test-lib-functions: suppress a 'git rev-parse' error in 'test_commit_bulk' Date: Mon, 25 Nov 2019 13:59:07 +0100 Message-Id: <20191125125907.28967-1-szeder.dev@gmail.com> X-Mailer: git-send-email 2.24.0.587.g7096fda53a MIME-Version: 1.0 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org 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 --- t/test-lib-functions.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/test-lib-functions.sh b/t/test-lib-functions.sh index b299ecc326..6302bfb51d 100644 --- a/t/test-lib-functions.sh +++ b/t/test-lib-functions.sh @@ -308,7 +308,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