From patchwork Mon Apr 17 19:10:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Rybak X-Patchwork-Id: 13214466 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 81D42C77B76 for ; Mon, 17 Apr 2023 19:10:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230366AbjDQTKx (ORCPT ); Mon, 17 Apr 2023 15:10:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35946 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230349AbjDQTKv (ORCPT ); Mon, 17 Apr 2023 15:10:51 -0400 Received: from mail-lj1-x231.google.com (mail-lj1-x231.google.com [IPv6:2a00:1450:4864:20::231]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BA9D05246 for ; Mon, 17 Apr 2023 12:10:50 -0700 (PDT) Received: by mail-lj1-x231.google.com with SMTP id 38308e7fff4ca-2a8bbea12d7so13605161fa.3 for ; Mon, 17 Apr 2023 12:10:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1681758649; x=1684350649; 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=AoLG7gzpp4S35EEYzEn1YBiDxioZoNwVly8mX3EnuZwnHYJ7aAo/2B1m6+GEAUPfSt ViDF3jZFHDLe+YDDUyA2TgDoXUfHK7thqg6xwqUN7QSxPq+g3i2ullsvHGWJc/tyr0z3 3SLzpSLn73ysFEcNsi3l+sgC6KPhbeRiEkwKOgVAywYPk6gxLqbbBEDelY7WEHcT2AdY mabVTcivkyNZ0gg/UIaDi1NXpaYO2RNlKUKgyI5pkg+vGpmj3dRd56UPmGAkeOJ+YUF3 HG0BFHmC3FKrADOCDmyYKrST4A9MAOnQrmLqsxRzbaWo/PTbckEt5jkT09VrAfTY8Q8O cSiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681758649; x=1684350649; 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=Q/3YGKGYQB/OR5h9jGdbtM75vta0oHWsfQQXPt3p+oaTHHllxIDAjI7t8gycLK0Mi5 d+Mjp7USHE8vOp0WVY4aIW9zurBL3oDzQfa1Zd/0BstDXJHK29/AxnJm05HjDuOkiOMD VSCUohD23D5E8VHxDthbOPk/cCaIA3Xfl2CSP8ZUk2IFgnl9sC0oyb67aSccqo+dGwg5 /RPKHlh7zn9SUh146BWbxcEXPJLcfY0bq5GgPkhpgdv3M2/+6/+4eYUCseUolarDuA3y uaYUNcMdFH+fLAdhB1bebRzAaZoHy54HwpSCoFCEq1LXt0XtbZy/sdni1J5ncc3t38Zk lLrQ== X-Gm-Message-State: AAQBX9c2gsKLaNSPF3P7283VnChLnHhigQN0xasJQs+zCq+HVKb62UTU 9nJOhrl1jcSYHnEdM60tPqLXi+wKE7oFxfzenCA= X-Google-Smtp-Source: AKy350bHMzfY/pKkGu834sNoOHyJzdtv4pkugY/s2Md9BKMGl1WQEze+39uVAUPKNP+gGa/82NSzTg== X-Received: by 2002:ac2:5399:0:b0:4e9:aeaa:ddb5 with SMTP id g25-20020ac25399000000b004e9aeaaddb5mr2069752lfh.14.1681758648514; Mon, 17 Apr 2023 12:10:48 -0700 (PDT) Received: from titov.fritz.box ([195.246.120.47]) by smtp.gmail.com with ESMTPSA id x1-20020a2e9c81000000b002a76e600228sm2304319lji.47.2023.04.17.12.10.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Apr 2023 12:10:47 -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 v3 1/6] t0300: don't create unused file Date: Mon, 17 Apr 2023 21:10:39 +0200 Message-Id: <20230417191044.909094-2-rybak.a.v@gmail.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230417191044.909094-1-rybak.a.v@gmail.com> References: <20230403223338.468025-1-rybak.a.v@gmail.com> <20230417191044.909094-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 17 19:10:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Rybak X-Patchwork-Id: 13214467 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 D8B2EC77B78 for ; Mon, 17 Apr 2023 19:10:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230374AbjDQTKz (ORCPT ); Mon, 17 Apr 2023 15:10:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35972 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230361AbjDQTKx (ORCPT ); Mon, 17 Apr 2023 15:10:53 -0400 Received: from mail-lj1-x22c.google.com (mail-lj1-x22c.google.com [IPv6:2a00:1450:4864:20::22c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9BFCC1FF3 for ; Mon, 17 Apr 2023 12:10:51 -0700 (PDT) Received: by mail-lj1-x22c.google.com with SMTP id l15so3047970ljq.8 for ; Mon, 17 Apr 2023 12:10:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1681758649; x=1684350649; 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=svFol8I3Ztn9XQCKcrB0N+r/TjFlSR96/wKUI1+QmzIp2j+6hARMcuJ+UgO0nHL/VY m+rzf4MT2OU2hk1igWX50WnZqFA0Rc1AP3guTBXzz3Oqk1jJqzP0vMa27ErDAU1wOlgX fYjqE+R/XGYJgm100SAy5UPDpa7P9Ut7Oj3jP9Xp2opy3DcqMq+kPq7+KS9E1ex5C+DP AkwewrlL0z/f4NT27dvZTg1TJLFvtNbKS6kSaFhLHQtoQnoaB9bLrQPFntq8g7hbdLk/ LOIWHztDyTwrd+ZXYLB8qi9tJptPm6+rWz4RUaGskcq7nFWH6BJvdJJwXvYPDE4mSebG 6qUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681758649; x=1684350649; 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=CS2jTtNiH8e2XuXnZZvygtCwKvfL57k2tBcmAJVIeSBFfEyZJ2XeEsGy9RlqRmIJdr pqImIgo/pH/JOjVkRPdbxyBL+rRc1EDWk1Rxgrk6VMY82G9xP3XY+RI9thYYdXM+uPcM 9gNPBrEHRKP81lLB/B/60LQNExVU0zuor5jMUGEEUNKUq0gcLkGhJNM7h0+3NYLvmW56 wwqsjCvmUPk6PTiGYt8bq1XGPdFwwo91v3muYYwPugPVjOPuhY4NM33OpG/ODsz26bGF pyO1c3CXfYnbNGQ6h0EfZjNRir+b5wj0F++HWMdbjTic2d+5J15+gJs6HrGlR1sC4iqd A3MQ== X-Gm-Message-State: AAQBX9fu/JWp4jJg4eX26zuNGcHWoUIfKzLxAWy0uncPjg82U4mbPaCp wDuEwhLZx3zmxvsxS7DTpq34raToZpDj3uop X-Google-Smtp-Source: AKy350ZfOx6iKN9M2koCQG88KEsblXr4AZKKpzpazZDo8vESEBxzXrL0fY7avgpGQBcXqimibzRFXA== X-Received: by 2002:a2e:3602:0:b0:2a8:c842:d30a with SMTP id d2-20020a2e3602000000b002a8c842d30amr976487lja.37.1681758649587; Mon, 17 Apr 2023 12:10:49 -0700 (PDT) Received: from titov.fritz.box ([195.246.120.47]) by smtp.gmail.com with ESMTPSA id x1-20020a2e9c81000000b002a76e600228sm2304319lji.47.2023.04.17.12.10.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Apr 2023 12:10:49 -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 v3 2/6] t1300: fix config file syntax error descriptions Date: Mon, 17 Apr 2023 21:10:40 +0200 Message-Id: <20230417191044.909094-3-rybak.a.v@gmail.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230417191044.909094-1-rybak.a.v@gmail.com> References: <20230403223338.468025-1-rybak.a.v@gmail.com> <20230417191044.909094-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 17 19:10:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Rybak X-Patchwork-Id: 13214468 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 4B6D9C77B76 for ; Mon, 17 Apr 2023 19:11:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230296AbjDQTK5 (ORCPT ); Mon, 17 Apr 2023 15:10:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36016 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230342AbjDQTKx (ORCPT ); Mon, 17 Apr 2023 15:10:53 -0400 Received: from mail-lj1-x236.google.com (mail-lj1-x236.google.com [IPv6:2a00:1450:4864:20::236]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8E4775246 for ; Mon, 17 Apr 2023 12:10:52 -0700 (PDT) Received: by mail-lj1-x236.google.com with SMTP id r9so13873212ljp.9 for ; Mon, 17 Apr 2023 12:10:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1681758650; x=1684350650; 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=b/EbPXDAJxSycFggh8UJ1hDWClzoEiW4Cp+QoG4YmuJrgiq5bfLqdDwgE3GtXM1Vip Lg/P/KeYv+dIJ7N9mXLIG4fUeQpetwVw7rbzmeZm7y1NI7VU2MKSfRjtZTYI3vhDEx3e RtM+qo/JPOFBm1r96CoS3ItzVbEM38Ea87qwZ62zsBPdmxzt1oH4H2VZV8FfD6brfbcU CGJVxW+c6kRwspcJY0X2luy41LHJbeNx16JFzsXMtSmy8nEb0Bj6A+4nOyNvqtdB6RYQ LODPnJvj5G+eMxNEl6QWKpChkDQBS16ahYWloeAbkfyZVRFlQtSpUggS5UHIFTmLnqKJ 1Udg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681758650; x=1684350650; 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=W+Wh+kESwG1cHbTt3im1hm4H1LPKHjYdxeqgFrGAeVaDk20NjzF8QvcajTd6xbJmQm 7LD1I9GHm1H7aJrAW2Pbsciz9WUNiJOd3tOqKz7lq4GBc8ouaDE6z/W1xYCdhyy0CxFb 7o/nvKAapB0UmSzMeJUXWhXba1ABBKwfg7fNgBF47Fz0ILyJaiM0eSUa/FCt1o1k0wX4 rgOu0Df+Aj4YSCjtKdg5UQLChw7p+hRz8QY0mItAGodOMXLKgp9POCIAb2dhvWYr/ZKk xgKwZ+7YR1wbemXjrUmtJq3zQbOv9K4Xa588epwJhKBZuKuZbbeN/yBeJeZo4wWfvOGL RElw== X-Gm-Message-State: AAQBX9fhsTs0DTspGMQgwjtYMbQjyaHO5gInnMGRqN8dHt5Zoa1+JIXI EeyGeegYqnWDqlCqF5y4Nx2KQMth3keAbQ== X-Google-Smtp-Source: AKy350a0tUfwbkuBI52Gy+cLyPa6GWhXFWbOSm2TXRPobQO9jsGwvggSf1RtOlLUyAP/HXXJxDGTSw== X-Received: by 2002:a2e:3511:0:b0:2a8:d94b:c0db with SMTP id z17-20020a2e3511000000b002a8d94bc0dbmr5124ljz.22.1681758650625; Mon, 17 Apr 2023 12:10:50 -0700 (PDT) Received: from titov.fritz.box ([195.246.120.47]) by smtp.gmail.com with ESMTPSA id x1-20020a2e9c81000000b002a76e600228sm2304319lji.47.2023.04.17.12.10.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Apr 2023 12:10:50 -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 v3 3/6] t1300: don't create unused files Date: Mon, 17 Apr 2023 21:10:41 +0200 Message-Id: <20230417191044.909094-4-rybak.a.v@gmail.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230417191044.909094-1-rybak.a.v@gmail.com> References: <20230403223338.468025-1-rybak.a.v@gmail.com> <20230417191044.909094-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 17 19:10:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Rybak X-Patchwork-Id: 13214469 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 0342DC77B72 for ; Mon, 17 Apr 2023 19:11:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230419AbjDQTLL (ORCPT ); Mon, 17 Apr 2023 15:11:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36074 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230375AbjDQTKz (ORCPT ); Mon, 17 Apr 2023 15:10:55 -0400 Received: from mail-lj1-x230.google.com (mail-lj1-x230.google.com [IPv6:2a00:1450:4864:20::230]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 809396EB7 for ; Mon, 17 Apr 2023 12:10:53 -0700 (PDT) Received: by mail-lj1-x230.google.com with SMTP id h8so11736770ljf.3 for ; Mon, 17 Apr 2023 12:10:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1681758651; x=1684350651; 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=CpRWj2efE9/yn357DrE//YZ1ALUJMyHIL4N5pN4vkZkOIsM2RVP4u+JLCGKyDBwtaw 1aFDsWhYOtU+0+tBqmg3m1DDNeUIsB2wwafAL8Rsig/LDy0h1gr85p5n7Ll1k5PqlzOM yIsWWlfkNcIJ7AUR3RwbxnNuNHOfvKJZe6AMf5SjseI7l04SI1ru3aA523WX0tfWlP54 wo6pidJZxIwoVM3FUkUQYI4SuYpvBysOOrWEjIY+FDlSZSm8QMvWaB3pnz/FUfDO5ZS+ o3oZlETN7McdPbgM3UMVa+cEvmZxm3SaRwvX3XuXUauGUEgD/El31XgiqL7ftJMf2QYE dHiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681758651; x=1684350651; 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=LhxD2wcb8+T0ZsMfS+Hy/qJLQ2cxKMn/HwNwiiku7y0TKbJVnXiFAo7GAB+KqeDrEk n2MT/50caeuozk2tPY2mGsClX+yv0yfvY7MrdaAHTIPMvM38plVgWdT5aadF/+SZawPM dluitNDtPLLN1Fg3I+NTE62tPM6gnH/c0KRzXKop9TxhK+UtmiHh9Zvc6hhYXi/vW1YF zUMFho9Qzo/GRuATuGO2wU/ikLh+Xnaby98l2E6Ug4Dybyr/kIK+FUosydUk8CWrMFtf ++vLvIHmbyg6NWxoCKiyBYUesz4xZyYa06L/U/gGH0ETk1xr9cT3d5BjgO9H9Ok3/z8z h4rg== X-Gm-Message-State: AAQBX9eu5v9Sx4axickHgGip4YHQc9qBHvjlLJBjfbYHQHT0brR6KsI6 Iqz80y+1j1F9ImjNRCuLb/6oGpdiwloK0A== X-Google-Smtp-Source: AKy350bk5GrscBBSdj2zgVIkegCWIqZzjqUVJkZTFzsw8s8YiQ6obgJgCgW2EcKveJ7hSUCpo54rxQ== X-Received: by 2002:a2e:854b:0:b0:2a7:b165:7db6 with SMTP id u11-20020a2e854b000000b002a7b1657db6mr7015ljj.20.1681758651457; Mon, 17 Apr 2023 12:10:51 -0700 (PDT) Received: from titov.fritz.box ([195.246.120.47]) by smtp.gmail.com with ESMTPSA id x1-20020a2e9c81000000b002a76e600228sm2304319lji.47.2023.04.17.12.10.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Apr 2023 12:10:51 -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 v3 4/6] t1450: don't create unused files Date: Mon, 17 Apr 2023 21:10:42 +0200 Message-Id: <20230417191044.909094-5-rybak.a.v@gmail.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230417191044.909094-1-rybak.a.v@gmail.com> References: <20230403223338.468025-1-rybak.a.v@gmail.com> <20230417191044.909094-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 17 19:10:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andrei Rybak X-Patchwork-Id: 13214470 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 0DD67C77B78 for ; Mon, 17 Apr 2023 19:11:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230392AbjDQTLN (ORCPT ); Mon, 17 Apr 2023 15:11:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36144 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230384AbjDQTK4 (ORCPT ); Mon, 17 Apr 2023 15:10:56 -0400 Received: from mail-lj1-x22b.google.com (mail-lj1-x22b.google.com [IPv6:2a00:1450:4864:20::22b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 811197AA1 for ; Mon, 17 Apr 2023 12:10:54 -0700 (PDT) Received: by mail-lj1-x22b.google.com with SMTP id e8so9452031ljn.2 for ; Mon, 17 Apr 2023 12:10:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1681758652; x=1684350652; 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=Zs44uYEVyY0L3k41dMzAcWmuhbt5LVq3BistLup/0Kc=; b=Z/C7CGpSZBxVVEE62+qKWCzvsfxCOh3hkPwS67AOXOHb5umIefZ+EiZdfO4MWF+Yw8 PvEBY96suM9npgW5AjimELYa8Ble9EJZPcDa+UY2txJsCltRjZM76nvHQl3zPAMTEPNS 9Ei1t0XrwnPWcwi59GQv1kX7hfRycd9JtCWV/h4mwsha1wKtycOaGYLRMXqAKwh1cR2a GuPdCkvb0VRQlJ1EVcPTvLrlEzIqp7JTvirU/nDd7sbwMVto8JK+112YQ3yiYUcbz+gf GV3NR++IkWa3wsRwNeXYRL7ZJesipNJkTVs44e8bC/9wrtbuihXFy6bB2uTvYxzdFpR1 mRnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681758652; x=1684350652; 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=Zs44uYEVyY0L3k41dMzAcWmuhbt5LVq3BistLup/0Kc=; b=V5tcSeMKENvjunmWybPgPSpDoikFdjvS59shu15EUxdJkPk0Irbf+Ko4B/z0L4hwHC +LiAEeobTKTc6oUnQJ7omZzhbshwMsIApSaqClWYG8oEMDc6Y8Nk8/s35dPr9dFUHHQ+ PHU+ZcOZdIXjQC+YZXQE1M9xhMicgc4Jd3V4lZOJxK4w9YW8qZfK4E2sHsoxXZL4TwCV rukpR7arTjONXK9FRpIQYwD3D5ywuXc/v1zHtUWB11L9nL4DOuvy4bRDC4Sg7UIu5dkm JpxLJcJLFzfYIqFFnow5vkeGkdoUZR/w4mBbKql6gNAmGLcCcO6PxqzwQwUAOxLBjeHZ 7B9A== X-Gm-Message-State: AAQBX9fuaP5lZ3wb7ta5OFz9+f4XOssE6rYqsSNbkggskJPAJWdD5blz xplNRuBFOMKIxOlS/MABw9tTctG64xIhRg== X-Google-Smtp-Source: AKy350axlpI0w2zdfP9i8sonDMIg3MeuuTiDwYPx0HoRi+Nq6x2S5yIvlKOJ5Cu50IU1u1mcZC9qkQ== X-Received: by 2002:a2e:380a:0:b0:2a8:ad87:279d with SMTP id f10-20020a2e380a000000b002a8ad87279dmr3021400lja.34.1681758652295; Mon, 17 Apr 2023 12:10:52 -0700 (PDT) Received: from titov.fritz.box ([195.246.120.47]) by smtp.gmail.com with ESMTPSA id x1-20020a2e9c81000000b002a76e600228sm2304319lji.47.2023.04.17.12.10.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Apr 2023 12:10:52 -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 v3 5/6] t1502: don't create unused files Date: Mon, 17 Apr 2023 21:10:43 +0200 Message-Id: <20230417191044.909094-6-rybak.a.v@gmail.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230417191044.909094-1-rybak.a.v@gmail.com> References: <20230403223338.468025-1-rybak.a.v@gmail.com> <20230417191044.909094-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. Acked-by: Øystein Walle Signed-off-by: Andrei Rybak --- 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 17 19:10:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Rybak X-Patchwork-Id: 13214471 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 964A6C77B76 for ; Mon, 17 Apr 2023 19:11:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230397AbjDQTLP (ORCPT ); Mon, 17 Apr 2023 15:11:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36096 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230393AbjDQTLK (ORCPT ); Mon, 17 Apr 2023 15:11:10 -0400 Received: from mail-lj1-x229.google.com (mail-lj1-x229.google.com [IPv6:2a00:1450:4864:20::229]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5A3657D8A for ; Mon, 17 Apr 2023 12:10:55 -0700 (PDT) Received: by mail-lj1-x229.google.com with SMTP id bz21so3693801ljb.11 for ; Mon, 17 Apr 2023 12:10:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1681758653; x=1684350653; 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=sJQEq0ejHJAvRQdC9Ttw/0bIkernAuHOX+SQ2wGK5yFW2+OpPnCUAlqEpo7ATD/ozS d4t+KirchIC93d4ebN6XFrYhp32xrmrESmCuDIWDsB6Y4ubiqBBUYlRSe11vlNwZYjUr 9B7M+LCEjLsWvYxCO3ISYuNI3t0jf43YCD6jSqKhGb7YbtFvcL0W0M5TQFocxsDnGSm3 GJ5FeXgujyvRvvNua/QqbkWXTGU+/6I5fxohgMTa4sG2SAeFKL4wIhf/go/FswJhGCNI noWG6IT/5qgPQm0yC1pDYso90h+umbj5iRdFyqNNvjPLbCjWV/OmfvkNf0zXP7XUCRu0 aP+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681758653; x=1684350653; 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=jjeG2ttuvRSjvnbPZsJPKjCBkxBpzNdN7nvGFMUHSDsgrjUNkQlnOtc7Oz/M4/V9K8 k1fF6paJ6WsJQIeJUxh5to27rk7aZ05TORP0Lb5dsdo1Gfj3pn+jWABHnXyzoxM5bvi2 dpV3lFVu8JLU9tu83i72dWVRynp+9fMZIvJgZDAanhoLqOg5uutJlz6QGIsPzBDJelrS 4xgLj9UuuS9h+b1psuIcIoA6ce4HLYyE5Kr3Ll9pc+LXP6WVOfMmaoG7t4dUSU80z667 klwEqMg+xItOXumoV8bSPdC6ymCtK60mcBmphakyAlYq0JQxkTG16++gPmR75HyzHIxs Y/bA== X-Gm-Message-State: AAQBX9dnxFG2rPqDopi2243fbUUppBopNaRgPf92WidwiMFpsC7Ehfl0 4Fg1HX18HzaCyl06UO7f0OpjuheUKEmcsg== X-Google-Smtp-Source: AKy350aDG5OCJx9CkIHbfVteVWUkjWq0gkvOAb4OizsLCBokcocoCSejQbZPDpWO4vKhIPkJp+FprA== X-Received: by 2002:a05:651c:550:b0:2a8:c45f:7e16 with SMTP id q16-20020a05651c055000b002a8c45f7e16mr1297855ljp.15.1681758653084; Mon, 17 Apr 2023 12:10:53 -0700 (PDT) Received: from titov.fritz.box ([195.246.120.47]) by smtp.gmail.com with ESMTPSA id x1-20020a2e9c81000000b002a76e600228sm2304319lji.47.2023.04.17.12.10.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Apr 2023 12:10:52 -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 v3 6/6] t2019: don't create unused files Date: Mon, 17 Apr 2023 21:10:44 +0200 Message-Id: <20230417191044.909094-7-rybak.a.v@gmail.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230417191044.909094-1-rybak.a.v@gmail.com> References: <20230403223338.468025-1-rybak.a.v@gmail.com> <20230417191044.909094-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 '