From patchwork Mon Apr 3 22:33:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Rybak X-Patchwork-Id: 13198891 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 3497AC76196 for ; Mon, 3 Apr 2023 22:33:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232969AbjDCWds (ORCPT ); Mon, 3 Apr 2023 18:33:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49610 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232357AbjDCWdr (ORCPT ); Mon, 3 Apr 2023 18:33:47 -0400 Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B57B34229 for ; Mon, 3 Apr 2023 15:33:43 -0700 (PDT) Received: by mail-wr1-x42e.google.com with SMTP id l12so30862974wrm.10 for ; Mon, 03 Apr 2023 15:33:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680561222; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=cTIVO4CzqYGDdGVLSLZ5Q4oUYJVrpVeyxTmpchSgJYI=; b=bpTaHZsbhXTdqLnslovWD1FZDmlK1uwLDSYMGhpQ2hcrLGeo2LT50TVpJGOc5seB6k IR/4nhXc6JA2btexpj3R3qQQqprLBjMUgDna1Jb0u8WVhj8BiRdXZVXllbYHl1d0NgQh ValGVnJa1skq6w24wMLDqmSvfxZjYIwf16wCC+ic1CuAZzKNjuZtFPeN/lz5BXK6zADS RoYIXuSXbnfhv/iVmWLR2FdRx41r1aCFQx0HN45wjVrfgHF/y5Qy+FJMEd81jCAH/SZE r6nSELwnHZ/88qtaX+qB/lo3kWBl1rHInj1Cn8oHi9eTm5Di9kS/XWMZAclsitMIlNpT IG7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680561222; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=cTIVO4CzqYGDdGVLSLZ5Q4oUYJVrpVeyxTmpchSgJYI=; b=KF6F93n7K5kQ4Wx3S0kO/BnTq5sWoG0Qs3kjA8VF2l8BVeXEtB4dZamHfKCzox3Px5 0RANbprTdW52JJRlvzov6jfMoczNBV098MJWGvZkQPhhkXCb6yXGDL36geeqgyR+HFrP MU7YIjTL/1H8zdgRQtamOzlNfpl15ULxrE5SjjRQ6BZRx4kh5Ojeu14IIiuqcpS3Kb3J musRkqr989L/GA4+qGmq7dzsYoFo6kicl6UNOtg1egHePFYB1maufwyjfmgli6dq4l+e 05V74/KoiWub1cCzy2sFYGaNGGJaSuWs7ZpdumTjGml04ALah47TDfRL6LhvoHOrq74f JnRw== X-Gm-Message-State: AAQBX9fxh9K3YzIGKcClKwIiEu49vsEgqPRfISZbTs3vFSW4t81OHhtv lW83sKOLYNjnyTTgQeeSwVZxebr5VVas5bK5RIw= X-Google-Smtp-Source: AKy350bYxVUWss7JPOMAHEJzXZgfsgRV8PKGHGc60K89tk7VWXVkOLz6L2t3HA/ZVNOE5bJL4OBF9A== X-Received: by 2002:a5d:560b:0:b0:2e4:b9a3:441a with SMTP id l11-20020a5d560b000000b002e4b9a3441amr43797wrv.50.1680561221642; Mon, 03 Apr 2023 15:33:41 -0700 (PDT) Received: from titov.fritz.box ([212.102.57.24]) by smtp.gmail.com with ESMTPSA id m17-20020adfe0d1000000b002d1e49cff35sm10697453wri.40.2023.04.03.15.33.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Apr 2023 15:33:41 -0700 (PDT) From: Andrei Rybak To: git@vger.kernel.org Cc: =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= , Johannes Schindelin , =?utf-8?q?=C3=98ystein_Wa?= =?utf-8?q?lle?= , Junio C Hamano Subject: [PATCH v2 1/6] t0300: don't create unused file Date: Tue, 4 Apr 2023 00:33:33 +0200 Message-Id: <20230403223338.468025-2-rybak.a.v@gmail.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230403223338.468025-1-rybak.a.v@gmail.com> References: <20230401212858.266508-1-rybak.a.v@gmail.com> <20230403223338.468025-1-rybak.a.v@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Test 'credential config with partial URLs' in t0300-credentials.sh contains three "git credential fill" invocations. For two of the invocations, the test asserts presence or absence of string "yep" in the standard output. For the third test it checks for an error message in standard error. Don't redirect standard output of "git credential" to file "stdout" in t0300-credentials.sh to avoid creating an unnecessary file when only standard error is checked. Signed-off-by: Andrei Rybak --- t/t0300-credentials.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/t0300-credentials.sh b/t/t0300-credentials.sh index c66d91e82d..b8612ede95 100755 --- a/t/t0300-credentials.sh +++ b/t/t0300-credentials.sh @@ -808,7 +808,7 @@ test_expect_success 'credential config with partial URLs' ' git -c credential.$partial.helper=yep \ -c credential.with%0anewline.username=uh-oh \ - credential fill stdout 2>stderr && + credential fill stderr && test_i18ngrep "skipping credential lookup for key" stderr ' From patchwork Mon Apr 3 22:33:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Rybak X-Patchwork-Id: 13198893 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 4E1BFC76196 for ; Mon, 3 Apr 2023 22:33:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233594AbjDCWdv (ORCPT ); Mon, 3 Apr 2023 18:33:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49612 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232555AbjDCWdr (ORCPT ); Mon, 3 Apr 2023 18:33:47 -0400 Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 50C4F422B for ; Mon, 3 Apr 2023 15:33:44 -0700 (PDT) Received: by mail-wr1-x42e.google.com with SMTP id j24so30933119wrd.0 for ; Mon, 03 Apr 2023 15:33:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680561222; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=eRu4JBrQ9k+aFnaTKf0xWSTGf6TU8UWVGqC92cgpg48=; b=lQZcpei97z8yZ62OGM5Z+/mJNXvujf0Da57OZs93KWx3/uy48h8gMlxuq2p7GRW3FW h1qSKT/UU6jDfetPmzCVxo+eilP0ykUaCdQna7RBLcvgn0sQ3j7mghLzf7YqGD126AO1 wIQTfbA+MYi4KYJQDk3MCL2/gBdBhJYlM86Ka7DyTDXLrwhFFKq582k0Kh5e0LC3Hr/4 c2bIjUeLKP9qvKq7QTIpwOgrDVGniAeSYh2EfoXEfCKK7AgV+Ks43QGUTSKR1ym8yG8Z SfQpLkJ+3qjVuLwGP6FWBhro33+mpEfDN36Ielif77deZC7AE+439+knkbMVlGZD+CmM w4MQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680561222; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=eRu4JBrQ9k+aFnaTKf0xWSTGf6TU8UWVGqC92cgpg48=; b=FEmKWs3IJKMYm3vd+K8e38ty8RVWNyd8/TN8d9C4ykfn9R1xfjejDra1FsojrCI/oS k444XgaWMCsJ7S2beWQI76n3c/rRgtvTAVEbbMWFa2AOY0HDB1/X9V+3JgTA2wZvIjDo 3udMteztDxzXkq3JdFMC1ZarhAdvC9Mlg12669LbOoas0hqIHcmqMtoEpVtUOkCvNvAf +fnyLtPEoj7HS2abUcaHWRJ/Xqw+xvodh8Sf6q0rWqKSdGAiGV6pRJXGOfcVxJtOR/SM TMcThamEpSLrlSopo3McyzHl+5bIhAPI3fCbgzzZdPCtM87JImDvwkT8dXxNsvslfFkt 6KNw== X-Gm-Message-State: AAQBX9eG/VbkwlwNmhIf8mO4IoHGOMZEHCCfliOvdtlyl48juXuFd5Dl oCqgEePMVpTkXtFAFdeh96x5utx7TzODkKINuJk= X-Google-Smtp-Source: AKy350YbmmvhgkmJw+1Yy01oVVNxGu6+gGL2IPQbDmCBgva78sIcFr62RJh0Pi0c14DsEVkxbHqZtg== X-Received: by 2002:adf:db81:0:b0:2ce:a093:6fd3 with SMTP id u1-20020adfdb81000000b002cea0936fd3mr74992wri.16.1680561222240; Mon, 03 Apr 2023 15:33:42 -0700 (PDT) Received: from titov.fritz.box ([212.102.57.24]) by smtp.gmail.com with ESMTPSA id m17-20020adfe0d1000000b002d1e49cff35sm10697453wri.40.2023.04.03.15.33.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Apr 2023 15:33:41 -0700 (PDT) From: Andrei Rybak To: git@vger.kernel.org Cc: =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= , Johannes Schindelin , =?utf-8?q?=C3=98ystein_Wa?= =?utf-8?q?lle?= , Junio C Hamano Subject: [PATCH v2 2/6] t1300: fix config file syntax error descriptions Date: Tue, 4 Apr 2023 00:33:34 +0200 Message-Id: <20230403223338.468025-3-rybak.a.v@gmail.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230403223338.468025-1-rybak.a.v@gmail.com> References: <20230401212858.266508-1-rybak.a.v@gmail.com> <20230403223338.468025-1-rybak.a.v@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Three tests in t1300-config.sh check that "git config --get" barfs when the config file contains various syntax errors: key=value pair without equals sign, broken section line, and broken value string. The sample config files include a comment describing the kind of broken syntax. This description seems to have been copy-pasted from the "broken section line" sample to the other two samples. Fix descriptions of broken config file syntax in samples used in t1300-config.sh. Signed-off-by: Andrei Rybak --- t/t1300-config.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/t/t1300-config.sh b/t/t1300-config.sh index 2575279ab8..d566729d74 100755 --- a/t/t1300-config.sh +++ b/t/t1300-config.sh @@ -1571,7 +1571,7 @@ test_expect_success 'git config --edit respects core.editor' ' # malformed configuration files test_expect_success 'barf on syntax error' ' cat >.git/config <<-\EOF && - # broken section line + # broken key=value [section] key garbage EOF @@ -1591,7 +1591,7 @@ test_expect_success 'barf on incomplete section header' ' test_expect_success 'barf on incomplete string' ' cat >.git/config <<-\EOF && - # broken section line + # broken value string [section] key = "value string EOF From patchwork Mon Apr 3 22:33:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Rybak X-Patchwork-Id: 13198897 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 E9911C76196 for ; Mon, 3 Apr 2023 22:33:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232367AbjDCWd5 (ORCPT ); Mon, 3 Apr 2023 18:33:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49648 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233492AbjDCWdt (ORCPT ); Mon, 3 Apr 2023 18:33:49 -0400 Received: from mail-wr1-x42a.google.com (mail-wr1-x42a.google.com [IPv6:2a00:1450:4864:20::42a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E7B36422C for ; Mon, 3 Apr 2023 15:33:44 -0700 (PDT) Received: by mail-wr1-x42a.google.com with SMTP id l27so30893005wrb.2 for ; Mon, 03 Apr 2023 15:33:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680561223; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=pHlsklKDtGHBtdf2RNlEwL2fSwX7wLVYtDR4NomFA70=; b=J0iSRHOvciPashI0IHar4dccbDwcf3O84EPeF/jaVhIpPp/6mfSkyoFX0ewRUrGWQW /MEEida0PUDb7mOxqpZH6dkZ7cteTVIyxbQWaTr2y+tG4ZFbKS85z78POryFTjAqyagY jDZjeJm2ii5hqbBky9jMLQCrIz7nNS6U0IaNrInRJ8nz9uLoh8ErfDoO/3HoJ9OHcFWY +UMm0P94uyCPY/FBuD0O0z/hdmneueYAHoJPpaOv4gzB7NgVDGgU3lBgDk0gHU2jBEnF pFSvRkT4hVfIrFGjcNmLBM6NCdSYaUds+I3veOuXCMUmI+E4jIBLcgrdzhmqF21odQh+ bVbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680561223; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=pHlsklKDtGHBtdf2RNlEwL2fSwX7wLVYtDR4NomFA70=; b=tPvwcauG8B84UIFbJ3fpQ8Wv12MKKtibgNMH1O6l8pzChF1GOm6M90/SfbIITnbbm1 VhmOixgtTMqumqEL5udplBOSahUsnfV1FeyL8HPXaHldSNisDVi9dMnEu8dD5wYONEvw 8+fBdXVsD5UoZSEuVnkXjS5dA46MN4xs+P5qlQJAtGwB7qQGuFIgg8p8gsedGW8zcYXe jHdtkWq5+DavCJWmv8Kkz6fisl6p7bvf6GLefl3Rhc9G66ZiATocU3DKp8V6Ueu58ijf TETbyazeN4C+LlBZmR+JswgAG8hidnmhjqptxk+nVzo3DiR1DXZgTUJsxbzF9ZbKf7I6 Dh3Q== X-Gm-Message-State: AAQBX9eqcOKI2VKMhwdYeUrRBTfkMKpLPXQgB8Oe0q6xcaoVpswyMik2 ST/7ooV1gV5bP8bMCoBgVx1yPv4PXL3uPE7NZeE= X-Google-Smtp-Source: AKy350aLGozItR+nzAhk/Ri9DyVhlDPM1Z313PKGEtHslWfQIjgpIGSyrDJEt3cX186reNe5b2a3jg== X-Received: by 2002:adf:facb:0:b0:2e5:5f89:3386 with SMTP id a11-20020adffacb000000b002e55f893386mr81365wrs.23.1680561222918; Mon, 03 Apr 2023 15:33:42 -0700 (PDT) Received: from titov.fritz.box ([212.102.57.24]) by smtp.gmail.com with ESMTPSA id m17-20020adfe0d1000000b002d1e49cff35sm10697453wri.40.2023.04.03.15.33.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Apr 2023 15:33:42 -0700 (PDT) From: Andrei Rybak To: git@vger.kernel.org Cc: =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= , Johannes Schindelin , =?utf-8?q?=C3=98ystein_Wa?= =?utf-8?q?lle?= , Junio C Hamano Subject: [PATCH v2 3/6] t1300: don't create unused files Date: Tue, 4 Apr 2023 00:33:35 +0200 Message-Id: <20230403223338.468025-4-rybak.a.v@gmail.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230403223338.468025-1-rybak.a.v@gmail.com> References: <20230401212858.266508-1-rybak.a.v@gmail.com> <20230403223338.468025-1-rybak.a.v@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Three tests in t1300-config.sh check that "git config --get" barfs when syntax errors are present in the config file. The tests redirect standard output and standard error of "git config --get" to files, "actual" and "error" correspondingly. They assert presence of an error message in file "error". However, these tests don't use file "actual" for assertions. Don't redirect standard output of "git config --get" to file "actual" in t1300-config.sh to avoid creating unnecessary files. Signed-off-by: Andrei Rybak --- t/t1300-config.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/t/t1300-config.sh b/t/t1300-config.sh index d566729d74..8ac4531c1b 100755 --- a/t/t1300-config.sh +++ b/t/t1300-config.sh @@ -1575,7 +1575,7 @@ test_expect_success 'barf on syntax error' ' [section] key garbage EOF - test_must_fail git config --get section.key >actual 2>error && + test_must_fail git config --get section.key 2>error && test_i18ngrep " line 3 " error ' @@ -1585,7 +1585,7 @@ test_expect_success 'barf on incomplete section header' ' [section key = value EOF - test_must_fail git config --get section.key >actual 2>error && + test_must_fail git config --get section.key 2>error && test_i18ngrep " line 2 " error ' @@ -1595,7 +1595,7 @@ test_expect_success 'barf on incomplete string' ' [section] key = "value string EOF - test_must_fail git config --get section.key >actual 2>error && + test_must_fail git config --get section.key 2>error && test_i18ngrep " line 3 " error ' From patchwork Mon Apr 3 22:33:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Rybak X-Patchwork-Id: 13198894 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 C7EEEC761AF for ; Mon, 3 Apr 2023 22:33:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233724AbjDCWdw (ORCPT ); Mon, 3 Apr 2023 18:33:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49622 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232916AbjDCWds (ORCPT ); Mon, 3 Apr 2023 18:33:48 -0400 Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 91290423A for ; Mon, 3 Apr 2023 15:33:45 -0700 (PDT) Received: by mail-wr1-x431.google.com with SMTP id t4so25642599wra.7 for ; Mon, 03 Apr 2023 15:33:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680561224; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=kzyaut080C5Mk+YZcbpDJgzsXvOXxhqZg0mRjZEaONM=; b=H9y62mXlA13IBovqtRGSOpWo6vGfcMtrEZ2OPdShDN1nqApNMgMLZQl6Vuy4wCG/U3 qgj1N5ZnwQXjrfCeX44EcsEKsDgsrpH9DRSOU2diRylHoYdLN2WgCzidyxwxIcgSfPla wW4vYGMNlY3N+MoM6cu8Tkluh56/HjVTXYHETnBlZJHIO2RImumfq0Z/1J5PyiTDq0c6 Uf9xNF3daRkURnbD/ge2tABRwLwnQ/RRLVEHjSREaezSoFQfxQ4mc+2uEWL60xihdLiD TvgldkHFUu6hl/tHUzuHKBrdAe5FubT2qL/w8QPTDl5BAI4xMtMcSDFVtLkTKWGLiZ/M Hj7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680561224; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=kzyaut080C5Mk+YZcbpDJgzsXvOXxhqZg0mRjZEaONM=; b=0Z/XYmT5vKBwmxYw2u+zUrwNG27GlyIE7ynsobYQFNeNy2pwJS3C31bWK/WIQEjlcy HVY9D91ZMMroxZJ3eQv4cakeo25sSchkfjZz/5eimiTP+FG/jP7tsWMx5w9QPQhGzLOU f4JD1+IU1a+eJ4sTmyr9AGQz+J9X+UWhmFxhLZw3mORKm/1ezzLq2nvTkL5yIKDCJ/ZY f5uTkshi5EQTRQPStR/d4vy95z8SjVS1PbPSbdXJfb37OM8UC+94oKlGU/Y3LHnCijGg ueJj5BRg5qMhuomHed5cjSHBgxQeR4zb9hPc4bXunnkX/l6yUdKSAG68S4AH6e8XTl7p DOrg== X-Gm-Message-State: AAQBX9epDb4AGUvvhJUzuod4KmRYiFSL2ZrmoenteeuNCNZ8u/lmkF7f Vc1/V2U1LT9YrtHPDU2a7YSo8pPn8qqm87vcark= X-Google-Smtp-Source: AKy350aaL/OowHuZIbs3LmGhDSoUCMIJ5fd8pGoNvPb0aJXvcYCvG/2sJypQLsZwSZ/NY8YLXbi1aQ== X-Received: by 2002:adf:f312:0:b0:2ce:a893:e45f with SMTP id i18-20020adff312000000b002cea893e45fmr99154wro.15.1680561223584; Mon, 03 Apr 2023 15:33:43 -0700 (PDT) Received: from titov.fritz.box ([212.102.57.24]) by smtp.gmail.com with ESMTPSA id m17-20020adfe0d1000000b002d1e49cff35sm10697453wri.40.2023.04.03.15.33.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Apr 2023 15:33:43 -0700 (PDT) From: Andrei Rybak To: git@vger.kernel.org Cc: =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= , Johannes Schindelin , =?utf-8?q?=C3=98ystein_Wa?= =?utf-8?q?lle?= , Junio C Hamano Subject: [PATCH v2 4/6] t1450: don't create unused files Date: Tue, 4 Apr 2023 00:33:36 +0200 Message-Id: <20230403223338.468025-5-rybak.a.v@gmail.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230403223338.468025-1-rybak.a.v@gmail.com> References: <20230401212858.266508-1-rybak.a.v@gmail.com> <20230403223338.468025-1-rybak.a.v@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Test 'fsck error and recovery on invalid object type' in file t1450-fsck.sh redirects output of a failing "git fsck" invocation to files "out" and "err" to assert presence of error messages in the output of the command. Commit 31deb28f5e (fsck: don't hard die on invalid object types, 2021-10-01) changed the way assertions in this test are performed. The test doesn't compare the whole standard error with prepared file "err.expect" and it doesn't assert that standard output is empty. Don't create unused files "err.expect" and "out" in test 'fsck error and recovery on invalid object type'. Signed-off-by: Andrei Rybak --- t/t1450-fsck.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/t/t1450-fsck.sh b/t/t1450-fsck.sh index bca46378b2..8c442adb1a 100755 --- a/t/t1450-fsck.sh +++ b/t/t1450-fsck.sh @@ -989,10 +989,7 @@ test_expect_success 'fsck error and recovery on invalid object type' ' garbage_blob=$(git hash-object --stdin -w -t garbage --literally err.expect <<-\EOF && - fatal: invalid object type - EOF - test_must_fail git fsck >out 2>err && + test_must_fail git fsck 2>err && grep -e "^error" -e "^fatal" err >errors && test_line_count = 1 errors && grep "$garbage_blob: object is of unknown type '"'"'garbage'"'"':" err From patchwork Mon Apr 3 22:33:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andrei Rybak X-Patchwork-Id: 13198896 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 E5004C761AF for ; Mon, 3 Apr 2023 22:33:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233365AbjDCWdz (ORCPT ); Mon, 3 Apr 2023 18:33:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49630 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233114AbjDCWdt (ORCPT ); Mon, 3 Apr 2023 18:33:49 -0400 Received: from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com [IPv6:2a00:1450:4864:20::42b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F3F9F423E for ; Mon, 3 Apr 2023 15:33:45 -0700 (PDT) Received: by mail-wr1-x42b.google.com with SMTP id y14so30909943wrq.4 for ; Mon, 03 Apr 2023 15:33:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680561224; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=v4w+HI83FU/79YXqcy302/Fl4K8tTc6dRuOqGhF+pVU=; b=moUDEy+e8KoodXTLzsYgYy3qS3Ggwn/7D6fZ1/lUak2+EaOIL9T1SE0h76C6YXzvYm oHapgYrR/Gr5B+qCQonpEEy8/tfmRVlA9lNDwdYZ+YV6NtrATerccW5aUjd8qKZmBDON yJaWZo6uSmvLBP8VG2cmh0qfbAK4xE7Bx82+p5Vckt7K2A/vxOQV4uxLDsAC7J5Vn8RJ Lp9NOCfx8AzXtDe1KcInApqzOgSIzXz+BW+VFfLNfbDPCykqJ4qYxz223ICJ6pWyPz+8 rCdfP6Ayn6CPtnh/WmEP2eiwjV6n58qIpJzpC6+tETrmEO0on1acLxU1NvyV5NxW1DFs DoIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680561224; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=v4w+HI83FU/79YXqcy302/Fl4K8tTc6dRuOqGhF+pVU=; b=iN4DMz2APJ4iREc9KK5dkUnM96Bq9487NN+xsP7XZZ4UwSAkOTDbC5NcoVn7tjT8C5 pyjghljqfjxLYfQXGH7pInka2IlWVczIjZ0FEFOGSAUN8d5Sp9kPE6Ny8eb98GygGW4j HGb+A52vvyvAvr9ZaB4917MplTW/eAXKJe4VK9gqL8QiRQGOrlt8gFxdKly2akvIkxDn rL8L+oJMEoBslM08QCucmDS4MNyOkwVQ5RsnqIIStehfI1ECvOcjTSHNBNBHHcHiNuhj KqTo5/piA8IXPX5RoT+DSrvPYTT+i9Alj9tgcCP23D3ZrAZHzLgvWQEecAiW32+vCCfq KpLw== X-Gm-Message-State: AAQBX9eN8y72rKu72UBqDo2zx3hN7SQg3YQMNCReZxePMGWsTIRncwlf WyylkBa6P7wiKr0Y5IDb3D34SpgCIsQJKmbhZzI= X-Google-Smtp-Source: AKy350bXEVHNAIieTYLalkVX0wuMS+f5XWqfvfRZ4O0oWJzyXecbioF8R25wwfEIwdmSSNeB4isGRA== X-Received: by 2002:adf:f888:0:b0:2d8:e6ba:99e8 with SMTP id u8-20020adff888000000b002d8e6ba99e8mr69142wrp.33.1680561224174; Mon, 03 Apr 2023 15:33:44 -0700 (PDT) Received: from titov.fritz.box ([212.102.57.24]) by smtp.gmail.com with ESMTPSA id m17-20020adfe0d1000000b002d1e49cff35sm10697453wri.40.2023.04.03.15.33.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Apr 2023 15:33:43 -0700 (PDT) From: Andrei Rybak To: git@vger.kernel.org Cc: =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= , Johannes Schindelin , =?utf-8?q?=C3=98ystein_Wa?= =?utf-8?q?lle?= , Junio C Hamano Subject: [PATCH v2 5/6] t1502: don't create unused files Date: Tue, 4 Apr 2023 00:33:37 +0200 Message-Id: <20230403223338.468025-6-rybak.a.v@gmail.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230403223338.468025-1-rybak.a.v@gmail.com> References: <20230401212858.266508-1-rybak.a.v@gmail.com> <20230403223338.468025-1-rybak.a.v@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Three tests in file t1502-rev-parse-parseopt.sh use three redirections with invocation of "git rev-parse --parseopt --". All three tests redirect standard output to file "out" and file "spec" to standard input. Two of the tests redirect standard output a second time to file "actual", and the third test redirects standard error to file "err". These tests check contents of files "actual" and "err", but don't use the files named "out" for assertions. The two tests that redirect to standard output twice might also be confusing to the reader. Don't redirect standard output of "git rev-parse" to file "out" in t1502-rev-parse-parseopt.sh to avoid creating unnecessary files. Signed-off-by: Andrei Rybak Acked-by: Øystein Walle --- t/t1502-rev-parse-parseopt.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/t/t1502-rev-parse-parseopt.sh b/t/t1502-rev-parse-parseopt.sh index de1d48f3ba..dd811b7fb4 100755 --- a/t/t1502-rev-parse-parseopt.sh +++ b/t/t1502-rev-parse-parseopt.sh @@ -302,14 +302,14 @@ test_expect_success 'test --parseopt help output: "wrapped" options normal "or:" |EOF END_EXPECT - test_must_fail git rev-parse --parseopt -- -h >out actual && + test_must_fail git rev-parse --parseopt -- -h actual && test_cmp expect actual ' test_expect_success 'test --parseopt invalid opt-spec' ' test_write_lines x -- "=, x" >spec && echo "fatal: missing opt-spec before option flags" >expect && - test_must_fail git rev-parse --parseopt -- >out err && + test_must_fail git rev-parse --parseopt -- err && test_cmp expect err ' @@ -339,7 +339,7 @@ test_expect_success 'test --parseopt help output: multi-line blurb after empty l |EOF END_EXPECT - test_must_fail git rev-parse --parseopt -- -h >out actual && + test_must_fail git rev-parse --parseopt -- -h actual && test_cmp expect actual ' From patchwork Mon Apr 3 22:33:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Rybak X-Patchwork-Id: 13198895 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 C7898C76196 for ; Mon, 3 Apr 2023 22:33:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233737AbjDCWdy (ORCPT ); Mon, 3 Apr 2023 18:33:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49626 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233096AbjDCWds (ORCPT ); Mon, 3 Apr 2023 18:33:48 -0400 Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1D7F040F1 for ; Mon, 3 Apr 2023 15:33:47 -0700 (PDT) Received: by mail-wr1-x430.google.com with SMTP id e18so30875986wra.9 for ; Mon, 03 Apr 2023 15:33:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680561225; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=wPA6VephNu4ae9tYi/0aHGAe7CNAeibjD4ifce3lHUg=; b=WU6rdMECMRatIjGqL8HWoO852odhauHUCgCcfNEVl3cYOT/cMC5E0C2A0kqSeZjPRE nnLz74HQrOOA7Qg/L6UIC5ATshv48CXY+nHr/r+a2/9BkSSD2cPs/o1sU7kMQ/CQEMvS ge3kuvl52WEEUPAYUQeKZqNaOW/jUkXesCvTpmYTXHlbum1szSGNKDpgXHbCy64Wr9XR lWmiVWXz5t1v2P0xOAXfzLvng/QHJzhcHfJVjUreij20H+/EpTx8agN9wpcb9ns6IYn+ RL4zN+l0Qt6IOWs+JzVRUN/6nyY9j6xJtkr30hD9Vb089kld2Hk7vqKDUgaHcDqN5bPc 29fw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680561225; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=wPA6VephNu4ae9tYi/0aHGAe7CNAeibjD4ifce3lHUg=; b=eVKYkQCl7rx5GK9pOB6YHjQir9vL9/5MDFkZIheiOL2FaWqe78oXmCZmLHnG8t38xO dIigSLVyx/r5cNQh9U83byLtj9jWlbmdkKBljq5utYX9mMJbLrILsBZbQD4OIAUsBOgG ZaC349/gQ8Pczugj9Ok8p6aX2j5+MZbkS+9pkBGWK6AxCD0bXWE955lGViNRwWLapXXE +c4uRa1GcK/fSQNNlx33MPcy6g70W3hntkCrtnJcaeOuG/rjAgFCeqU3A5h75jOSxRyj hFXtC9LK28ovwG2LpZpc7eBbsmNti7n4yGUKoKanzUkpstY7UgZgOpeYkj6ajZ+WlkUM FXhA== X-Gm-Message-State: AAQBX9clQdkWbtEIxGEonGgyWz4V//nGi+qrSJKwmlWCsVnw0qWdWPUt /n2b4/1X19erJ3Xe91+VFCJMzx3tP8mSz6jaDFY= X-Google-Smtp-Source: AKy350bS0cDNS1iPVHDdezW1p4M/KgJVCHAXXpEUh72REyhIfhJfIUjSM0g5SZx2omp7LXLFKbE57g== X-Received: by 2002:a5d:42c7:0:b0:2e9:bbad:7e7 with SMTP id t7-20020a5d42c7000000b002e9bbad07e7mr64109wrr.38.1680561225017; Mon, 03 Apr 2023 15:33:45 -0700 (PDT) Received: from titov.fritz.box ([212.102.57.24]) by smtp.gmail.com with ESMTPSA id m17-20020adfe0d1000000b002d1e49cff35sm10697453wri.40.2023.04.03.15.33.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Apr 2023 15:33:44 -0700 (PDT) From: Andrei Rybak To: git@vger.kernel.org Cc: =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= , Johannes Schindelin , =?utf-8?q?=C3=98ystein_Wa?= =?utf-8?q?lle?= , Junio C Hamano Subject: [PATCH v2 6/6] t2019: don't create unused files Date: Tue, 4 Apr 2023 00:33:38 +0200 Message-Id: <20230403223338.468025-7-rybak.a.v@gmail.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230403223338.468025-1-rybak.a.v@gmail.com> References: <20230401212858.266508-1-rybak.a.v@gmail.com> <20230403223338.468025-1-rybak.a.v@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Tests in t2019-checkout-ambiguous-ref.sh redirect two invocations of "git checkout" to files "stdout" and "stderr". Several assertions are made using file "stderr". File "stdout", however, is unused. Don't redirect standard output of "git checkout" to file "stdout" in t2019-checkout-ambiguous-ref.sh to avoid creating unnecessary files. Signed-off-by: Andrei Rybak --- t/t2019-checkout-ambiguous-ref.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/t/t2019-checkout-ambiguous-ref.sh b/t/t2019-checkout-ambiguous-ref.sh index 2c8c926b4d..9540588664 100755 --- a/t/t2019-checkout-ambiguous-ref.sh +++ b/t/t2019-checkout-ambiguous-ref.sh @@ -16,7 +16,7 @@ test_expect_success 'setup ambiguous refs' ' ' test_expect_success 'checkout ambiguous ref succeeds' ' - git checkout ambiguity >stdout 2>stderr + git checkout ambiguity 2>stderr ' test_expect_success 'checkout produces ambiguity warning' ' @@ -37,7 +37,7 @@ test_expect_success 'checkout reports switch to branch' ' ' test_expect_success 'checkout vague ref succeeds' ' - git checkout vagueness >stdout 2>stderr && + git checkout vagueness 2>stderr && test_set_prereq VAGUENESS_SUCCESS '