From patchwork Sat Apr 1 21:28:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Rybak X-Patchwork-Id: 13197215 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 EC3B9C77B60 for ; Sat, 1 Apr 2023 21:29:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230146AbjDAV3G (ORCPT ); Sat, 1 Apr 2023 17:29:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60044 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229880AbjDAV3E (ORCPT ); Sat, 1 Apr 2023 17:29:04 -0400 Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5E52993CA for ; Sat, 1 Apr 2023 14:29:03 -0700 (PDT) Received: by mail-wm1-x32d.google.com with SMTP id o24-20020a05600c511800b003ef59905f26so15881846wms.2 for ; Sat, 01 Apr 2023 14:29:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680384541; 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=on65t8rikSv4AVit8DthFs5uOleH1rA8ap6xeK+pqxY=; b=N6+J8SQY6JM2i958nLqwn5BGIUgrT00sUaokrBpeOQ2WeYHVGV2oPvFSSxpLeGKMr4 0iwmwDR99xCZBpL4scD288ix+XzU3Y3AWcKJDX5IbrBcdt5p8jOQiZHeJtB90qoD8K/D isDg/ONO3eBVzTHvjve7DFhK1KqToQLO9VsuCXrL4inZ9WRI2LyimvmjQVIi3uA+WV75 R8RRl67TDImI7tlm4bOOwo7J2hLenMVhSOsTgzOMqOirIY+LlM+DHpHdobqDNz9Ah9g3 TGYQw2V5MgAp790H/9itaKq0K324LXmKQ1IMX8oszkDPBQwe9KaECsV1Fbk1459kwify /ePg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680384541; 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=on65t8rikSv4AVit8DthFs5uOleH1rA8ap6xeK+pqxY=; b=l9EPSXgxzXXmgrXrbftshQmCL4muPN5hBIK/ZjIvo5jkxflRTUSMG7kExoTkRwavC3 fSCz9kKEPuFQJ4Et/rmDP8YmJGaoQKE5FJRt5BE5V8dNT9Kg48UeV95CHt+lwBGbOc8v 5AFcxVC/xPR/g53gtQnv4AH/+/mAiWZS67fkKTOo7ZeCDoRsVSZp4WAsihHvWhFqVbEa pfPngQ8e24WmJBIwxDdGw07DyFpYaxlNyLVaBi/MYj75jkY+rMqyHGRwLOZwfacQyv0n zlsIX9tjE6T98LzyxYvUQ+z7SiwogQemMl4k3HltoAkzaDF0k8Kiv7PHpQoyX45PsAa4 eqTw== X-Gm-Message-State: AAQBX9cfSplX+5WyGbQu4bab6icGtcMlUY6CJHblKoY7LOhqrsrdl08J ovaGykodPfbVEwz6aOP1BeBa4sOSDUAu0Alz X-Google-Smtp-Source: AKy350buy6HE1SZCOyQCLLey56Kx075ANPpDSaRKO5Yd4GUgveky9crw9eGuUynIgiWGOx7zuwyutg== X-Received: by 2002:a7b:c009:0:b0:3ef:62c6:9930 with SMTP id c9-20020a7bc009000000b003ef62c69930mr21127398wmb.3.1680384541437; Sat, 01 Apr 2023 14:29:01 -0700 (PDT) Received: from titov.fritz.box ([212.102.57.24]) by smtp.gmail.com with ESMTPSA id i12-20020a5d55cc000000b002c3f81c51b6sm5738364wrw.90.2023.04.01.14.29.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 01 Apr 2023 14:29:01 -0700 (PDT) From: Andrei Rybak To: git@vger.kernel.org Cc: =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= , Johannes Schindelin , Martin Stenberg , =?utf-8?q?=C3=98ystein_Walle?= , Junio C Hamano Subject: [PATCH v1 1/6] t0300: don't create unused file Date: Sat, 1 Apr 2023 23:28:53 +0200 Message-Id: <20230401212858.266508-2-rybak.a.v@gmail.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230401212858.266508-1-rybak.a.v@gmail.com> References: <20230401212858.266508-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 contaisn 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 Sat Apr 1 21:28:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Rybak X-Patchwork-Id: 13197217 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 507E2C77B72 for ; Sat, 1 Apr 2023 21:29:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230152AbjDAV3H (ORCPT ); Sat, 1 Apr 2023 17:29:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60060 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230090AbjDAV3F (ORCPT ); Sat, 1 Apr 2023 17:29:05 -0400 Received: from mail-wm1-x335.google.com (mail-wm1-x335.google.com [IPv6:2a00:1450:4864:20::335]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 890B493FB for ; Sat, 1 Apr 2023 14:29:04 -0700 (PDT) Received: by mail-wm1-x335.google.com with SMTP id o32so14908634wms.1 for ; Sat, 01 Apr 2023 14:29:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680384542; 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=A1jbdTKQB9fbrB5X3B4Jj5sVyZAQNPOj9c7w5NGhmqSKoZFIWlwILcWVrpMBPcsbP2 yf7fSwI6wAnmWJUdW9xYUIn/SLp1PHz+AjXodKxf6fT0UyOr0/TJkOSGTr5m7ek2cbnw R+e4nNo5bY8DhvDGW7l+i1pk54L2rfC7qyexX2h0zGijSZfX5m0X72yUpgWPjxzJ+K66 0e2PnS95E+Vcw3gzU+iLRxUX0SOlngoaRWvt966Y6DBL3m8zJUwD2tvz47JZfQketxTo /C5G5KS9RHqPSMRujy7CWqgUDbWV5kdfZZRJQpu1Mru86Q6u5biSJ1/tYs+AcbyM28CD yYhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680384542; 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=ouoD/Yy1c7yAAKWXXU2Mukp4lJ1qlATof/j2jttRwq+qrdEYkdzEyqXGRtt5NPzKRs VGnY5n3jMIFjK7OlYA1AhlzeycPHFIBhSp9zcgh+qdoSpUpkJQCOtroEtrG165BW2kO2 zfXnHjLg7V33RTO59h8z9WQ0B+4yVd8rwUTYcuBrjZKoyuM/SjQ8RQ4kTmZ7AW7Kzu6U 7Nmhz2T2g+rWloq1b1tWZy27708VaZAyNcxCrZco5jpZavrviXFodAszd+GpZSthbmyY f6Gwxa4UytpapC0TNxTV9gjYAmM3jMIzxsH1H1SnvDOYXTB2tJEgMNS7mDJli+JvZwMk 15ew== X-Gm-Message-State: AO0yUKX+6SpzhPQUiZuXZG0XK/YeqPLHvePmhhJXtczs8nykBDoJqfun DSgRPP4LNs1O6kbHn+6FgX/pyfiU5egneq2+ X-Google-Smtp-Source: AK7set8e0V5dL9m0h5AlRz0uVKCRucWLLdeHLfUPiXqxU+abDzrRF8flq6J3jnVVFgkERouGViFhDg== X-Received: by 2002:a1c:770b:0:b0:3ed:4b0f:5378 with SMTP id t11-20020a1c770b000000b003ed4b0f5378mr23351175wmi.27.1680384542275; Sat, 01 Apr 2023 14:29:02 -0700 (PDT) Received: from titov.fritz.box ([212.102.57.24]) by smtp.gmail.com with ESMTPSA id i12-20020a5d55cc000000b002c3f81c51b6sm5738364wrw.90.2023.04.01.14.29.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 01 Apr 2023 14:29:01 -0700 (PDT) From: Andrei Rybak To: git@vger.kernel.org Cc: =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= , Johannes Schindelin , Martin Stenberg , =?utf-8?q?=C3=98ystein_Walle?= , Junio C Hamano Subject: [PATCH v1 2/6] t1300: fix config file syntax error descriptions Date: Sat, 1 Apr 2023 23:28:54 +0200 Message-Id: <20230401212858.266508-3-rybak.a.v@gmail.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230401212858.266508-1-rybak.a.v@gmail.com> References: <20230401212858.266508-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 Sat Apr 1 21:28:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Rybak X-Patchwork-Id: 13197218 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 72EE3C77B71 for ; Sat, 1 Apr 2023 21:29:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230162AbjDAV3L (ORCPT ); Sat, 1 Apr 2023 17:29:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60078 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230113AbjDAV3G (ORCPT ); Sat, 1 Apr 2023 17:29:06 -0400 Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CB4ED93C2 for ; Sat, 1 Apr 2023 14:29:04 -0700 (PDT) Received: by mail-wm1-x329.google.com with SMTP id u11-20020a05600c19cb00b003edcc414997so15916499wmq.3 for ; Sat, 01 Apr 2023 14:29:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680384543; 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=HE+wkz6bvcwtHL2FhuP3BKjC+XBy+f6s25fabYBrSfjtStrb/RE5zHR5J8KuC7GR9G Zc/sl/yroElQ/xsKZNZeFkQCfGeRRkCJpewQhnBUkWLWmkSkCBf9aSkI+xxxsdmV2soD FpAlHnD8OapbpfuRnbeYj0gdQINZhpj9PxxTdojb6Jr7AQhXsXzfCJjfr0zeuVHiHgsK vK/5dBKtXhC23bgmVxdJZbNnanXeIRew4gtGOsMgdsXzC+KCrIvEXB0w0BMdVuIF2gYQ tcHXqMJMrMFCrKekez/WXP+PAm9CcJLDxVVCaipLP0+EmgK82jqQx0OcZTMt/Tqf31nY o+wQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680384543; 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=pAQd459qUpkbYYDlXkKla+tF686Y6DhUnw7PkCnuDbR8NN2UU9RrEdYH4g/QxEp4qG tBp+VITM1c2rCKnebkLD/zFODesJP7TybjmvfunONBzzMDIKGbZ+40wRbj8791CX41I1 sfvaArg4j92M1E6WpgKKTwqmy6xEcx6y+nwOgrs/fnXo8oFVcolFaLAg3pakiRI6BjMy Yh7mxteEL2iNWvJbRnAdWOZmY769yfBqSuaVd0frKr4bXskFMW0Vv5mme6dHVausN6Hm zerM9ucX07s5Pqwd9l3M0DY/y1mia2dfQR9Cm0duWs0n3cDGfwHfUky+IoyNQpiT1TCJ ApTA== X-Gm-Message-State: AAQBX9fDACWlCys63Q624qrE9elaeCPoPc09SAvpTvqeUtu8PKYbrJKk 0zrym4aW1051SV8Bg31q+uMEi+uUwwIpny+N X-Google-Smtp-Source: AKy350Yfg3S5oioFi39u8PCYckFmAuvFkejZg4qCAsJ4RhOGsjthW27CD5BrdCiCPVYKbZ47gdaFmg== X-Received: by 2002:a05:600c:cc:b0:3f0:3049:b216 with SMTP id u12-20020a05600c00cc00b003f03049b216mr9937192wmm.28.1680384542818; Sat, 01 Apr 2023 14:29:02 -0700 (PDT) Received: from titov.fritz.box ([212.102.57.24]) by smtp.gmail.com with ESMTPSA id i12-20020a5d55cc000000b002c3f81c51b6sm5738364wrw.90.2023.04.01.14.29.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 01 Apr 2023 14:29:02 -0700 (PDT) From: Andrei Rybak To: git@vger.kernel.org Cc: =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= , Johannes Schindelin , Martin Stenberg , =?utf-8?q?=C3=98ystein_Walle?= , Junio C Hamano Subject: [PATCH v1 3/6] t1300: don't create unused files Date: Sat, 1 Apr 2023 23:28:55 +0200 Message-Id: <20230401212858.266508-4-rybak.a.v@gmail.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230401212858.266508-1-rybak.a.v@gmail.com> References: <20230401212858.266508-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 Sat Apr 1 21:28:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Rybak X-Patchwork-Id: 13197219 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 87594C77B74 for ; Sat, 1 Apr 2023 21:29:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230168AbjDAV3M (ORCPT ); Sat, 1 Apr 2023 17:29:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60090 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230150AbjDAV3G (ORCPT ); Sat, 1 Apr 2023 17:29:06 -0400 Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C450593FB for ; Sat, 1 Apr 2023 14:29:05 -0700 (PDT) Received: by mail-wr1-x429.google.com with SMTP id j24so25749360wrd.0 for ; Sat, 01 Apr 2023 14:29:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680384544; 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=T1dqTpWp2u276FsstFf4bTO2OolKIvWjiQVIKQQGdlTfFyAzyPf1zTJrgR2HVOzhiF k96r2eXb8Qibrcb+Yl9cqQFZQ92lkoPvZGH+d4nBV7EpS08D2SaM2RBe/6Hc2zsuz+8k OZKdZ6nsuQ7xTDsv1PY3EXMYxhg6r91koZy2CDdz8vlyl7jkXUm9UlVl0zxfQpNvDN28 0n9LIj2GfMwjFbHSvsaYqJUDBOLM0e7GMMVKXSy4F77EoOA9OePeOo4NZFLQh/8R9osr vyVQ7NeE06Dv+cs10SlUzUhXr7WaHwLhmur1j9ieOwQ5zVw8tsUOHVLOZ5hbZGl72bKU gkkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680384544; 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=zGKdvZIQL9YF+Hu15+C3w9WffjU0xfPPzfZf6B71qI7rX6eNeKb48aOoyc7gDLfJim AXHmEc9+5RwQh+0wsvx5F1AUAL0nuRdN1V0mi4EnsIf7ooBq+uJcnOtxZaUmUXb/cIZW xXX0WIKkU9jWB4XEdaDC3c8hPc3RPfixWtDe0ijfTr3scD++UqEawFPA6N1PxWhQHZkG hqhsz6TPBfjanLb8WM5IcKRV+HiSCpoeQjRilQ8aGO/52ydTDsfyZIMJ58BbLljV4Sc2 aiXkwL7jqs6KvjrIjK1OUHqqx3frNZDocCaXiCixcI3X8T2ZW11KD+6Kvs+m6ylpLWJa Y1Hg== X-Gm-Message-State: AAQBX9cZqR/uv89vbCVzdcIOD7HTpT33j+WQ94nMefADenWcIEGaEzM1 yJrZIda8h82V9QbfPYFL4ZArS6GpCkjOpfsG X-Google-Smtp-Source: AKy350ahJDBUP+9NKl/e+A+muTvLr7o40BPoJ2NL1zf/UwRNUhQvu5DAvqGxLR2rNfDmwfdRGJcJgg== X-Received: by 2002:adf:f90f:0:b0:2e5:1c60:5afd with SMTP id b15-20020adff90f000000b002e51c605afdmr5372819wrr.1.1680384543747; Sat, 01 Apr 2023 14:29:03 -0700 (PDT) Received: from titov.fritz.box ([212.102.57.24]) by smtp.gmail.com with ESMTPSA id i12-20020a5d55cc000000b002c3f81c51b6sm5738364wrw.90.2023.04.01.14.29.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 01 Apr 2023 14:29:03 -0700 (PDT) From: Andrei Rybak To: git@vger.kernel.org Cc: =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= , Johannes Schindelin , Martin Stenberg , =?utf-8?q?=C3=98ystein_Walle?= , Junio C Hamano Subject: [PATCH v1 4/6] t1450: don't create unused files Date: Sat, 1 Apr 2023 23:28:56 +0200 Message-Id: <20230401212858.266508-5-rybak.a.v@gmail.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230401212858.266508-1-rybak.a.v@gmail.com> References: <20230401212858.266508-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 Sat Apr 1 21:28:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Rybak X-Patchwork-Id: 13197216 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 3ED72C77B6D for ; Sat, 1 Apr 2023 21:29:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230158AbjDAV3J (ORCPT ); Sat, 1 Apr 2023 17:29:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60080 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230141AbjDAV3G (ORCPT ); Sat, 1 Apr 2023 17:29:06 -0400 Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 41B1993CA for ; Sat, 1 Apr 2023 14:29:05 -0700 (PDT) Received: by mail-wr1-x432.google.com with SMTP id e18so25692727wra.9 for ; Sat, 01 Apr 2023 14:29:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680384544; 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=ZtA08fsi0OYhQJAVs9uGGbWQjt5QwrLZpldMbNCo0OU0sW3aMSZ9thuHJyT5vPQWbg XFWdRiZbhdUWVOAd3nP7JH5BwhHN3Ihm5xj8IFLK3pwrRrOevhLf9orKReeFtrRjsBYo D4+gW9IVjeFoqoUq3+lO/dwn90+L0ic9hp7tkMDv1jffsWGylNNf6go8ZXSQBq2skvxq cv4rzHxZxOva+Mr0T8WPdjvH59lO7RpYNtT5eg9MOXW0uNjVVp+MtvVusnWFtVslP4ax KR9dQKaumcKDFT9UfpZgnMCe+rakGM3VRxRZcHL14KOoRWKr+1amN75EDSgSqfA52HHP 4gXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680384544; 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=js60eA8qyMx11MagvZ1ofWmVDAHQn7UrmUUfA8qpITKHCgyDTz1AEzirfxbYQp0Kbv +fXcxBzpryTxoP0mUCYrB/n4FToDPwXxeGMAGPNUHxRAZYTa3oL9vmc5pS5M+R1Q3MB6 wx/IymPH0Sfx+5cwzokJt8b1ayAje0sOSU6AwqFwP+9GmKOcgJOToghOKLjMCg+qbqVe /0jkz428LHVhc35PymXs1DoE2yl5rgdQgEdqnorixUL1M1F+Px0bV3rP72oZ/N14H1nA l8UNOwFJKpxIKhIgu5IbfdRtckTl/rwV6mlMgbtKJSsy/h1r0p9fj1BHC4RcJF2pg0hT IC/w== X-Gm-Message-State: AAQBX9f1TB/xLmbSbzbcDaN2n44WCNDpAi4ODoS9jmkKMSBlMzSxVdoC 4Pk9gS3lCkjfxOdhKLrptZZXbmfChi2Hb6e0 X-Google-Smtp-Source: AKy350am9mk/0QQbIMvbAYz3HPEwhjjCRhX03UNyIBc/KoguxEzdwZ33V9ICNKNdUDbASq6zLLW09g== X-Received: by 2002:adf:e401:0:b0:2d4:896:a204 with SMTP id g1-20020adfe401000000b002d40896a204mr21698897wrm.60.1680384544446; Sat, 01 Apr 2023 14:29:04 -0700 (PDT) Received: from titov.fritz.box ([212.102.57.24]) by smtp.gmail.com with ESMTPSA id i12-20020a5d55cc000000b002c3f81c51b6sm5738364wrw.90.2023.04.01.14.29.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 01 Apr 2023 14:29:04 -0700 (PDT) From: Andrei Rybak To: git@vger.kernel.org Cc: =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= , Johannes Schindelin , Martin Stenberg , =?utf-8?q?=C3=98ystein_Walle?= , Junio C Hamano Subject: [PATCH v1 5/6] t1502: don't create unused files Date: Sat, 1 Apr 2023 23:28:57 +0200 Message-Id: <20230401212858.266508-6-rybak.a.v@gmail.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230401212858.266508-1-rybak.a.v@gmail.com> References: <20230401212858.266508-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 --- 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 Sat Apr 1 21:28:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Rybak X-Patchwork-Id: 13197220 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 DB917C77B6E for ; Sat, 1 Apr 2023 21:29:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230113AbjDAV3S (ORCPT ); Sat, 1 Apr 2023 17:29:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60108 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230153AbjDAV3H (ORCPT ); Sat, 1 Apr 2023 17:29:07 -0400 Received: from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com [IPv6:2a00:1450:4864:20::32c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 08FB1A26A for ; Sat, 1 Apr 2023 14:29:07 -0700 (PDT) Received: by mail-wm1-x32c.google.com with SMTP id j18-20020a05600c1c1200b003ee5157346cso17515153wms.1 for ; Sat, 01 Apr 2023 14:29:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680384545; 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=kk3teSVZPWiIVX2xSPVMH4p2juVQgA2138L1TwdMhtaMf/AbuDUS/Fa+EgHFhQKV8V UgqahSAdtF5qaCJakHTNzIT0wjwket+998L4uR+oMsfRppq6q608U5NFLAeB5u9QIHKa R2Bb0PWidUjaV4xGpLzeDl1Fi+z4d64JPiWPmogMx6HFnhWmfTcRKoNw3ABNd0COB4mv iQUTYXPdWTaqWdbQlNmsDtVLoN+aVQ+bE/PHgEynzl3awd3Bgj3ax+gmpIGcxPC9EFFw NPO0QaFDbGe1LlQ/LVnymTAJLpjHx2CiJS1FL9QcWTDdUn7rNkLIFXs/wr2PM3RFabxf v3ww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680384545; 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=Hdxp/SfLXgPbzsniXJ+SjxU6vGVVU5+l4wTnSbcPavTiZbjxLQNlIOSRqIKJt3fUhX y+I4CpJTpep46+uBUkdQo0dpjTdJTopchCRry7e0y+0jZtLcIRRiKkrikWaFYSGK1KUv e7lYp6Brevz3J5zOuOUq9sM4oEJ4a1caQeh2tr/8twAEArBMPuGvfKlvsgGbY9LvP0Ay iXyBzsG2yJzvHHzEkLVq/6AKX4CoPqVYToVCfmp8MyWFfk8MqAsP6qmZR26yy6Dq9AQx h1uwBCInRx1xqJnvPElh+jyZ/UGI66efusO+vnzYgHtrlpLztLooXwaPRZ5YsH4FfJ27 8naw== X-Gm-Message-State: AAQBX9fKL2E+I6UYSz4OK2p/XlSPpIyaCQ+dhp0EnLp4+N6aBACOF/kq kN7bTPmzq1AhFUpV6uPth4VS0suFbmMtw3/o X-Google-Smtp-Source: AKy350ZxYbkYAfps72rvqE9NJDp9giR7xgfHaSyVjiQs/EnRXOcyxu45OYiTT85Joey/wmkowcKyGg== X-Received: by 2002:a7b:c001:0:b0:3f0:3d41:bda3 with SMTP id c1-20020a7bc001000000b003f03d41bda3mr6100343wmb.5.1680384545189; Sat, 01 Apr 2023 14:29:05 -0700 (PDT) Received: from titov.fritz.box ([212.102.57.24]) by smtp.gmail.com with ESMTPSA id i12-20020a5d55cc000000b002c3f81c51b6sm5738364wrw.90.2023.04.01.14.29.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 01 Apr 2023 14:29:04 -0700 (PDT) From: Andrei Rybak To: git@vger.kernel.org Cc: =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= , Johannes Schindelin , Martin Stenberg , =?utf-8?q?=C3=98ystein_Walle?= , Junio C Hamano Subject: [PATCH v1 6/6] t2019: don't create unused files Date: Sat, 1 Apr 2023 23:28:58 +0200 Message-Id: <20230401212858.266508-7-rybak.a.v@gmail.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230401212858.266508-1-rybak.a.v@gmail.com> References: <20230401212858.266508-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 '