From patchwork Wed May 10 12:34:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13236896 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1C003C77B7D for ; Wed, 10 May 2023 12:34:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236931AbjEJMe1 (ORCPT ); Wed, 10 May 2023 08:34:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36334 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237037AbjEJMeR (ORCPT ); Wed, 10 May 2023 08:34:17 -0400 Received: from wout3-smtp.messagingengine.com (wout3-smtp.messagingengine.com [64.147.123.19]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 85F0D8A7D for ; Wed, 10 May 2023 05:34:15 -0700 (PDT) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id A32053200918; Wed, 10 May 2023 08:34:14 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Wed, 10 May 2023 08:34:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=cc:cc :content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm3; t=1683722054; x=1683808454; bh=LG o9vVT1L7kR3aHZ6e9SNBL392g2PWuQlN2grdCeRnc=; b=aRVS+S5PKXAQE2+2l8 dGo7o55d44IYT/rbpO3etQEX0NgVJV20hLTatw/KZv6ilSnZCjRvEo75TudYvhjD QzyEK47RwPEnN0vkwxrfINRgqKT4DT5DMXLzETeCr/59e9o61uAXCykQL9/DV2IB F26zn30GDvtKwwSd1KpstGJUFAE+S0IDj0zbxbGHj6lZrOqpJ91y/6S+Zk30NxtP kYYhxRiuFhbpqTPmM7QrtdQLspsfE3+iU69Q9RY8l6OAOfSM4avvmNUb7IGO4hxZ a5sibI8YLPz5b8CSazEu9mG08COkAdGZR3sux3bog/12BS2serZN4dmlmsoFbdEg J9lQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; t=1683722054; x=1683808454; bh=LGo9vVT1L7kR3 aHZ6e9SNBL392g2PWuQlN2grdCeRnc=; b=csnQWbnin0yKGANCL50rseB4BO3TF 4Aa/cwAOep7CXCIqeURptY5Ucw4+9oppbtRSFyAr1uzaYnvcS/LgEMEu9cAGqeej mFcXOyvySh1vVgBaq84czxzNDGQNbJCejpWSOKmXFhAfz3/b3bP5xL3Vw2Gcqoq8 mQnBUyChOLT2tA6VGaVxDNf9wm/gmHKjFSiE7FtfYVUtvqVyl7Io78GJ97yxa/B+ TD5tHkNU+Y55zA1wPwANPJ0UjumJrqmpude4UyM7TOXwhFAECzwmOyOMrC0N4VOO gXPZmV+cRA92M9j78Y9OPpAccODXAufKUkjavOMUcGlpcYm7B/LdB98eg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfeegiedgfeefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkfhggtggujgesghdtreertddtvdenucfhrhhomheprfgrthhr ihgtkhcuufhtvghinhhhrghrughtuceophhssehpkhhsrdhimheqnecuggftrfgrthhtvg hrnhepueektdevtdffveeljeetgfehheeigeekleduvdeffeeghefgledttdehjeelffet necuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepphhsse hpkhhsrdhimh X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 10 May 2023 08:34:12 -0400 (EDT) Received: by pks.im (OpenSMTPD) with ESMTPSA id b49b9302 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Wed, 10 May 2023 12:34:03 +0000 (UTC) Date: Wed, 10 May 2023 14:34:11 +0200 From: Patrick Steinhardt To: git@vger.kernel.org Cc: Junio C Hamano , Felipe Contreras , Glen Choo , Jonathan Tan , Jacob Keller Subject: [PATCH v5 3/9] fetch: add a test to exercise invalid output formats Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Add a testcase that exercises the logic when an invalid output format is passed via the `fetch.output` configuration. Signed-off-by: Patrick Steinhardt --- t/t5574-fetch-output.sh | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/t/t5574-fetch-output.sh b/t/t5574-fetch-output.sh index f91b654d38..8a344e6790 100755 --- a/t/t5574-fetch-output.sh +++ b/t/t5574-fetch-output.sh @@ -7,6 +7,30 @@ export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME . ./test-lib.sh +test_expect_success 'fetch with invalid output format configuration' ' + test_when_finished "rm -rf clone" && + git clone . clone && + + test_must_fail git -C clone -c fetch.output fetch origin 2>actual.err && + cat >expect <<-EOF && + error: missing value for ${SQ}fetch.output${SQ} + fatal: unable to parse ${SQ}fetch.output${SQ} from command-line config + EOF + test_cmp expect actual.err && + + test_must_fail git -C clone -c fetch.output= fetch origin 2>actual.err && + cat >expect <<-EOF && + fatal: invalid value for ${SQ}fetch.output${SQ}: ${SQ}${SQ} + EOF + test_cmp expect actual.err && + + test_must_fail git -C clone -c fetch.output=garbage fetch origin 2>actual.err && + cat >expect <<-EOF && + fatal: invalid value for ${SQ}fetch.output${SQ}: ${SQ}garbage${SQ} + EOF + test_cmp expect actual.err +' + test_expect_success 'fetch aligned output' ' git clone . full-output && test_commit looooooooooooong-tag &&