From patchwork Sun Mar 12 20:15:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Rybak X-Patchwork-Id: 13171802 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 23478C6FD19 for ; Sun, 12 Mar 2023 20:16:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230515AbjCLUQO (ORCPT ); Sun, 12 Mar 2023 16:16:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47198 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229839AbjCLUQJ (ORCPT ); Sun, 12 Mar 2023 16:16:09 -0400 Received: from mail-ed1-x535.google.com (mail-ed1-x535.google.com [IPv6:2a00:1450:4864:20::535]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3DDD923C7D for ; Sun, 12 Mar 2023 13:15:28 -0700 (PDT) Received: by mail-ed1-x535.google.com with SMTP id j11so40838894edq.4 for ; Sun, 12 Mar 2023 13:15:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678652126; 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=d895dUOxWPPChw42PvJDA9T4pBTSv8OFKsLOHA7WlWE=; b=Y2mWkOoziTHUXx7MBAy0+Vwo/Y3pegkiSw+Wh/ttE6kFDiPi5MqG+M6YvW5QBSqNhT yiMhV3m5IQqvpEb8c6e0PxsqLy0UU27rqkUGlGhDF0Kkw63EAavhYUo6Dv/iDmjf71qP aGLQ/EdN1bbU9EPtKEEWN1m43rYsVADkaa4sJ+w8VBDonuI76fA8n6jbCfMgYCt1wII9 OMILmxtXZ7Jkv+tR03BygABQcPwo4rH6r7D+e6V0buY2gx7lOYSkFtXIasWON7YLPVnu yTnHndiFlcTKPqmJo3QaNTILPkw2i2z02qPJ2jqAnNYbRABYphZIpJYNaIpLQ/lsK8M/ PZLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678652126; 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=d895dUOxWPPChw42PvJDA9T4pBTSv8OFKsLOHA7WlWE=; b=geFlg8sDx24Zw4ZFaWtuNwpmx2zovYOTjigcTTw0TcxIZzzrG/s61fHNYAUB2/zFE7 fb775tMkBTTINTP4Z4WJTHD9tvy49qwQ79Wujgvp1fe0nMBJQhwURWRXEs3mb9rM5Uhf VOciB1En6zyJFtgopfBvH6gHfI8B3KNlRt782abka3mKDweDvj66q6n8dZ2WqbqLAUvd UgFEUxj6oB+rgwqQ2ehta/SIsJ9YfKG3DmFfrtMJVp39B/5R78V7jqeTfWJdk41G61Me 5U3NDep//QBN41DcSyVMjVYnwubPkeOAFY42txNBZkifORvDJvfuW0NbUnDwOxEFE/QK jFdA== X-Gm-Message-State: AO0yUKWhkJkQXorCTPkx6L0u6mT2jqqCcB7qC6+tsDNRdxsXyegl2RSj qUaiVYj4NvCdJAcbIJB/hODQq4Lbps9VRQ== X-Google-Smtp-Source: AK7set8Y6f4PgTDMF/RUzDK0ukrFusadj9Bhez1Vv53ZEGHvywrCOs7z+LTw5lja/lYptOGQTl9+EA== X-Received: by 2002:a17:907:7f0b:b0:888:7ac8:c0f4 with SMTP id qf11-20020a1709077f0b00b008887ac8c0f4mr34402480ejc.25.1678652126329; Sun, 12 Mar 2023 13:15:26 -0700 (PDT) Received: from titov.fritz.box ([216.24.216.227]) by smtp.gmail.com with ESMTPSA id hz17-20020a1709072cf100b008dceec0fd4csm2570344ejc.73.2023.03.12.13.15.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Mar 2023 13:15:26 -0700 (PDT) From: Andrei Rybak To: git@vger.kernel.org Cc: Junio C Hamano , =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBC?= =?utf-8?b?amFybWFzb24=?= , Michael J Gruber , Jeff King , Patrick Steinhardt , Michael Haggerty Subject: [PATCH v1 1/7] t1005: assert output of ls-files Date: Sun, 12 Mar 2023 21:15:13 +0100 Message-Id: <20230312201520.370234-2-rybak.a.v@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230312201520.370234-1-rybak.a.v@gmail.com> References: <20230312201520.370234-1-rybak.a.v@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Test 'reset should work' in t1005-read-tree-reset.sh compares two files "expect" and "actual" to assert the expected output of "git ls-files". Several other tests in the same file also create files "expect" and "actual", but don't use them in assertions. Assert output of "git ls-files" in t1005-read-tree-reset.sh to improve test coverage. Signed-off-by: Andrei Rybak --- t/t1005-read-tree-reset.sh | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/t/t1005-read-tree-reset.sh b/t/t1005-read-tree-reset.sh index 12e30d77d0..26be4a2b5a 100755 --- a/t/t1005-read-tree-reset.sh +++ b/t/t1005-read-tree-reset.sh @@ -41,7 +41,8 @@ test_expect_success 'reset should remove remnants from a failed merge' ' git ls-files -s && read_tree_u_must_succeed --reset -u HEAD && git ls-files -s >actual && - ! test -f old + ! test -f old && + test_cmp expect actual ' test_expect_success 'two-way reset should remove remnants too' ' @@ -56,7 +57,8 @@ test_expect_success 'two-way reset should remove remnants too' ' git ls-files -s && read_tree_u_must_succeed --reset -u HEAD HEAD && git ls-files -s >actual && - ! test -f old + ! test -f old && + test_cmp expect actual ' test_expect_success 'Porcelain reset should remove remnants too' ' @@ -71,7 +73,8 @@ test_expect_success 'Porcelain reset should remove remnants too' ' git ls-files -s && git reset --hard && git ls-files -s >actual && - ! test -f old + ! test -f old && + test_cmp expect actual ' test_expect_success 'Porcelain checkout -f should remove remnants too' ' @@ -86,7 +89,8 @@ test_expect_success 'Porcelain checkout -f should remove remnants too' ' git ls-files -s && git checkout -f && git ls-files -s >actual && - ! test -f old + ! test -f old && + test_cmp expect actual ' test_expect_success 'Porcelain checkout -f HEAD should remove remnants too' ' @@ -101,7 +105,8 @@ test_expect_success 'Porcelain checkout -f HEAD should remove remnants too' ' git ls-files -s && git checkout -f HEAD && git ls-files -s >actual && - ! test -f old + ! test -f old && + test_cmp expect actual ' test_done From patchwork Sun Mar 12 20:15:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Rybak X-Patchwork-Id: 13171805 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 1D1C6C6FD19 for ; Sun, 12 Mar 2023 20:16:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231176AbjCLUQS (ORCPT ); Sun, 12 Mar 2023 16:16:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48160 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230219AbjCLUQJ (ORCPT ); Sun, 12 Mar 2023 16:16:09 -0400 Received: from mail-ed1-x532.google.com (mail-ed1-x532.google.com [IPv6:2a00:1450:4864:20::532]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4DF0E252B4 for ; Sun, 12 Mar 2023 13:15:30 -0700 (PDT) Received: by mail-ed1-x532.google.com with SMTP id r15so13634321edq.11 for ; Sun, 12 Mar 2023 13:15:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678652128; 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=NzNH/lDBlykWYTnnxsAXBgRpj+TTxcLofsgIfF2z0o0=; b=K9oZByQGjGY+YZHqWfM/ZOCoeFGSV4PeiMS+La9V7EY3QeMi8Uvy4CTpkWmN1FGjWh PRM/VaDLmyN71NhC4z3fqkE6+aDtXwxnVFZ/shpP3niUYAf5ndEemIZq+hI7/y732jC1 UY4wLKKtVNRdDenn5urmlp7/cblsj1kTGWam7bn2cTLlBvPpWOppxvJsne5zP9Qsef4k dZxVjRnlj7PG4ys2E0BQVO+KEg2lkh761epMz2sCG3qS7eO8XM2dpUTvvzL+SZ7VksSU xO/8t9bO1dfRsQaDyz8DisRdOfOLbQvdOqQKnex5N26uDWnq8XhmPtJ2GXgsDd+WGrhS t06g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678652128; 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=NzNH/lDBlykWYTnnxsAXBgRpj+TTxcLofsgIfF2z0o0=; b=I5g7UkLgrbGjRZMwbE0QxQsZvcVm6Wz2ckPIKehobbEJ8RdyAA4p3F2aluJhSohl6j x5lnT9fakzBTvxVZWgn1XTwG3D9jAoHNAJ1ycv19HJyLRl4g6Ty1e0NNBwKz3WnDXMuy PjNKNj/uQMkuOA5N/usG0K+pJy8K2EJuh6JpV3R98Sk2KvYcIHgmfhMaLIY0N3jSdtx6 WsCvBhWxRc+piV5Ku5/IFnMcdU1ZESlbUAwQNuVGuJWbe3aaYFcsuOb1xEbv6AsQJLbW vOQ4AUwVMYxjJYQjrUSwxRMCn5ZXNPi6aAERS4WCW6jayCNg+DS3150Yeabkgs5+33m3 ARcA== X-Gm-Message-State: AO0yUKXKOZAMN4oUSdzAtctxujIxivmRVL4nIyVpQcXCvQpOmtgFfdJG z1u4E+OO4F77YoENI/I9FOqvXTikwRLw0w== X-Google-Smtp-Source: AK7set+HIQlSehvM1wLN1o9zbY9Jl/X82TX5VkG154Z1LinE8s6zt1pATwgLAOY6/HktaUNjokOA7g== X-Received: by 2002:a17:907:9485:b0:922:1826:8275 with SMTP id dm5-20020a170907948500b0092218268275mr6367432ejc.11.1678652128640; Sun, 12 Mar 2023 13:15:28 -0700 (PDT) Received: from titov.fritz.box ([216.24.216.227]) by smtp.gmail.com with ESMTPSA id hz17-20020a1709072cf100b008dceec0fd4csm2570344ejc.73.2023.03.12.13.15.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Mar 2023 13:15:28 -0700 (PDT) From: Andrei Rybak To: git@vger.kernel.org Cc: Junio C Hamano , =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBC?= =?utf-8?b?amFybWFzb24=?= , Michael J Gruber , Jeff King , Patrick Steinhardt , Michael Haggerty Subject: [PATCH v1 2/7] t1006: assert error output of cat-file Date: Sun, 12 Mar 2023 21:15:15 +0100 Message-Id: <20230312201520.370234-4-rybak.a.v@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230312201520.370234-1-rybak.a.v@gmail.com> References: <20230312201520.370234-1-rybak.a.v@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Test "cat-file $arg1 $arg2 error on missing full OID" in t1006-cat-file.sh compares files "expect.err" and "err.actual" to assert the expected error output of "git cat-file". A similar test in the same file named "cat-file $arg1 $arg2 error on missing short OID" also creates these two files, but doesn't use them in assertions. Assert error output of "git cat-file" in test "cat-file $arg1 $arg2 error on missing short OID" of t1006-cat-file.sh to improve test coverage. Signed-off-by: Andrei Rybak --- t/t1006-cat-file.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/t/t1006-cat-file.sh b/t/t1006-cat-file.sh index 2d875b17d8..8eac74b59c 100755 --- a/t/t1006-cat-file.sh +++ b/t/t1006-cat-file.sh @@ -603,7 +603,8 @@ do fatal: Not a valid object name $(test_oid deadbeef_short) EOF test_must_fail git cat-file $arg1 $arg2 $(test_oid deadbeef_short) >out 2>err.actual && - test_must_be_empty out + test_must_be_empty out && + test_cmp expect.err err.actual ' test_expect_success "cat-file $arg1 $arg2 error on missing full OID" ' From patchwork Sun Mar 12 20:15:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Rybak X-Patchwork-Id: 13171806 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 C723BC6FA99 for ; Sun, 12 Mar 2023 20:16:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231267AbjCLUQV (ORCPT ); Sun, 12 Mar 2023 16:16:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48264 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231160AbjCLUQJ (ORCPT ); Sun, 12 Mar 2023 16:16:09 -0400 Received: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [IPv6:2a00:1450:4864:20::52a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0833725947 for ; Sun, 12 Mar 2023 13:15:32 -0700 (PDT) Received: by mail-ed1-x52a.google.com with SMTP id er25so12692280edb.5 for ; Sun, 12 Mar 2023 13:15:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678652130; 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=AgSq2BEB0xF42jwRYRTu1mJl7/fw7pc2jBu5sMhfKUA=; b=PzCYINe3sHJIh7b9HC6lc6zbsgyI7lW+orw6G8HpEpR8iZtvTiOQjZf+50u0brKDu6 s8IrRwcEsbytThSSybJ3MdySQeuaRjKE+PR7PC2WBJK8HZX+Zjm6BUeGAmH7ENQL/2lx hRLjr02rO3YcN0x/VXQMC8b7/cbkBAOh1fZjdc7LxU+qQwSz6VOwndr3LqjGeLTExAVY J2IsAATQjxZ3bqVzFvzqVJMoOPZzqRChusfBea44CwwkOLunC4WdBgqqenXX4rIRQoX+ Bx+JvvAufOPwX7ZXhNLvEN+dWMyVOxEQmMqtuUdDncW2KFEmV/Rtw4/SsyjaTX1pSO5U 11UQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678652130; 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=AgSq2BEB0xF42jwRYRTu1mJl7/fw7pc2jBu5sMhfKUA=; b=57YNCcu+aIOrlzEdOEmpFIll65GBcnlArquBPZbchAT4nVs+3YaHkgMdyOpWSXrIgk FPwvW1p4lvFmf/lkbLbogDRYB2dS+XCIqxrAXFe0dRbBORSRemPcnnyEAnuAlIFKGves s4Cxd3xATaRWo68qxC7ucQViN4gtsZD1sSEq3opIfbJuGo2+Ki93Jfb0DgF8b7rSnzcn 3fr2myhP+rWEeWif/BoYgpHdN+tbEYH/78gk+RyoVFT7dPuwbNvCuREFcQF+tcbxYIhM Y7gfdFKXrs6wAAe08iZVhDGfmEJHL38z9dVrB9pNFHBkKhIVGFtm/0dOLbdF/BFMUSx/ WDmg== X-Gm-Message-State: AO0yUKXaUyXAnl5y7ert469lRQ7mPhDAfBi1iSI8l0R2o8vBmIeyT1Wu BWMY+eWARAU3rB/Y/jm1O627xcGKe+rutg== X-Google-Smtp-Source: AK7set+DwAG9pXaAvQHck75XzO/V3LEOuq6kVYfITuvNjcI6+52clKFm/sCuaVosx84ZqJFJbBuEOw== X-Received: by 2002:a17:907:8a06:b0:889:ed81:dff7 with SMTP id sc6-20020a1709078a0600b00889ed81dff7mr40089089ejc.9.1678652130080; Sun, 12 Mar 2023 13:15:30 -0700 (PDT) Received: from titov.fritz.box ([216.24.216.227]) by smtp.gmail.com with ESMTPSA id hz17-20020a1709072cf100b008dceec0fd4csm2570344ejc.73.2023.03.12.13.15.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Mar 2023 13:15:29 -0700 (PDT) From: Andrei Rybak To: git@vger.kernel.org Cc: Junio C Hamano , =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBC?= =?utf-8?b?amFybWFzb24=?= , Michael J Gruber , Jeff King , Patrick Steinhardt , Michael Haggerty Subject: [PATCH v1 3/7] t1010: assert empty output of mktree Date: Sun, 12 Mar 2023 21:15:16 +0100 Message-Id: <20230312201520.370234-5-rybak.a.v@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230312201520.370234-1-rybak.a.v@gmail.com> References: <20230312201520.370234-1-rybak.a.v@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Builtin "git mktree" writes the the object name of the tree object built to the standard output. Tests 'mktree refuses to read ls-tree -r output (1)' and 'mktree refuses to read ls-tree -r output (2)' in "t1010-mktree.sh" redirect output of "git mktree" to a file, but don't use its contents in assertions. Assert that the output of "git mktree" is empty when it refuses to build a tree object. Signed-off-by: Andrei Rybak --- t/t1010-mktree.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/t/t1010-mktree.sh b/t/t1010-mktree.sh index 3c08194526..31ea2ec0bb 100755 --- a/t/t1010-mktree.sh +++ b/t/t1010-mktree.sh @@ -60,11 +60,13 @@ test_expect_success 'allow missing object with --missing' ' ' test_expect_success 'mktree refuses to read ls-tree -r output (1)' ' - test_must_fail git mktree actual + test_must_fail git mktree actual && + test_must_be_empty actual ' test_expect_success 'mktree refuses to read ls-tree -r output (2)' ' - test_must_fail git mktree actual + test_must_fail git mktree actual && + test_must_be_empty actual ' test_done From patchwork Sun Mar 12 20:15:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Rybak X-Patchwork-Id: 13171807 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 E06F0C6FA99 for ; Sun, 12 Mar 2023 20:16:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229909AbjCLUQX (ORCPT ); Sun, 12 Mar 2023 16:16:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47256 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231169AbjCLUQJ (ORCPT ); Sun, 12 Mar 2023 16:16:09 -0400 Received: from mail-ed1-x531.google.com (mail-ed1-x531.google.com [IPv6:2a00:1450:4864:20::531]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2B14F2B2A5 for ; Sun, 12 Mar 2023 13:15:33 -0700 (PDT) Received: by mail-ed1-x531.google.com with SMTP id y4so11364808edo.2 for ; Sun, 12 Mar 2023 13:15:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678652131; 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=tRLzc/FxLRIAmy2YZ+bEuB1merOAPMakqVgnb04WRFo=; b=R2VsncTCW9S3Z91jaV8PFVmxXRSdKU6j4LK5TIbbAvC7y72fbrWFiO1hqgZnmpC2pE q8MxMvTOsAF53Im8Ds8g61EQlSgUUGyBmTp8sfadG7mfytq0lwJI8Y7n5psmz3vYQHUM sWFvXT48MlYdrsgb1ZcBG3vSViR23MGgi+yAUMuFZjv0UOKyNOlQrQnbiCZ97OdCVJpM Ct5NOwJf3g0Yja0fMlQo50PqlHMKyRbSS6zrkK/s+35zju/Fn9ciWorpB9R5KPiGspno HSA1c1z9Q/5E4qPPGg8xzbeo3QqXmsLcc6RC3mkh1DCXDVSH1i08tqtf6dzqrjYum5Jb P0LA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678652131; 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=tRLzc/FxLRIAmy2YZ+bEuB1merOAPMakqVgnb04WRFo=; b=Id5NRVRNRITg7YMIp3rsiVCAeCnO9FhX/bRUCuMKGtGCUS9kAOj+z911A/e6kt+VDh eFqSswhQ6V7iPhKl/X5Gt7hSZdP3HJK2zK+S9JdTWDMFggFVgX6Rywn14nCUCXlaKnMc LCFoo97la5hLNC9awyGs3+JknwGpiJxRvtnVFjkU/nXzaxbYpLVhHXzbphoURerx6lgt 2S+0O7DhexuZl9/XbqPTjQDDDfGH6Ksl1YhFWcFx5avRANeic+n6dkthdD7RHJw2HTQi TUgpBdzdwpyW+122cR7qvsx1c2n6UFgbzMUkq6mCE22fkvPgftuT4bWwMWiJ3L0M1E08 6SjA== X-Gm-Message-State: AO0yUKVkbwIv5u6Ip27EsZ0QYJALIB2kiNGh4iksDFhAvtRF7eMiKwSq v022QCgX6JSN48MKjlAqH+bpqLXf5tD0mg== X-Google-Smtp-Source: AK7set/MbSoEurBGeIihk9B2oqgRJKQOtX6tJpQdhii8W5efQheutILDRvDXxM1NE5ozYE1jBpczog== X-Received: by 2002:a17:906:885:b0:8af:5403:992d with SMTP id n5-20020a170906088500b008af5403992dmr32979088eje.28.1678652131413; Sun, 12 Mar 2023 13:15:31 -0700 (PDT) Received: from titov.fritz.box ([216.24.216.227]) by smtp.gmail.com with ESMTPSA id hz17-20020a1709072cf100b008dceec0fd4csm2570344ejc.73.2023.03.12.13.15.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Mar 2023 13:15:31 -0700 (PDT) From: Andrei Rybak To: git@vger.kernel.org Cc: Junio C Hamano , =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBC?= =?utf-8?b?amFybWFzb24=?= , Michael J Gruber , Jeff King , Patrick Steinhardt , Michael Haggerty Subject: [PATCH v1 4/7] t1302: don't create unused file Date: Sun, 12 Mar 2023 21:15:17 +0100 Message-Id: <20230312201520.370234-6-rybak.a.v@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230312201520.370234-1-rybak.a.v@gmail.com> References: <20230312201520.370234-1-rybak.a.v@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Test 'gitdir selection on unsupported repo' in t1302-repo-version.sh writes output of a "git config" invocation to file "actual". However, the test doesn't have any assertions for the file. The file was used by this test until commit b9605bc4f2 (config: only read .git/config from configured repos, 2016-09-12), before which "git config" was expected to print the bogus value of "core.repositoryformatversion" to standard output. Don't redirect output of "git config" to file "actual" in test 'gitdir selection on unsupported repo'. Signed-off-by: Andrei Rybak --- t/t1302-repo-version.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/t1302-repo-version.sh b/t/t1302-repo-version.sh index 70389fa2eb..179474fa65 100755 --- a/t/t1302-repo-version.sh +++ b/t/t1302-repo-version.sh @@ -37,7 +37,7 @@ test_expect_success 'gitdir selection on normal repos' ' test_expect_success 'gitdir selection on unsupported repo' ' # Make sure it would stop at test2, not trash - test_expect_code 1 git -C test2 config core.repositoryformatversion >actual + test_expect_code 1 git -C test2 config core.repositoryformatversion ' test_expect_success 'gitdir not required mode' ' From patchwork Sun Mar 12 20:15:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Rybak X-Patchwork-Id: 13171808 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 6FB79C6FD19 for ; Sun, 12 Mar 2023 20:16:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231285AbjCLUQ0 (ORCPT ); Sun, 12 Mar 2023 16:16:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48266 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231171AbjCLUQK (ORCPT ); Sun, 12 Mar 2023 16:16:10 -0400 Received: from mail-ed1-x529.google.com (mail-ed1-x529.google.com [IPv6:2a00:1450:4864:20::529]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5E5652B609 for ; Sun, 12 Mar 2023 13:15:34 -0700 (PDT) Received: by mail-ed1-x529.google.com with SMTP id cy23so40722313edb.12 for ; Sun, 12 Mar 2023 13:15:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678652132; 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=G/Qr7JQKwY1aEHaHum0I31e8nLbOslObM7iZqQbIxUA=; b=mNnAHFa7mN9RBY85x5/94SJwJos0T478W8wwQqiu/o2qGIGxMnc/4pcsqF52Sy0RWJ LhyxLhHckq6dqO6fAg/7VHFsNqHe4ubnt3BBozDrIo4NcXEi65DdMAuEaa4IgHFjfI5P 0rE3MJZsn423nO9evKPQQmnpw6otRfB2k+61lT6MQN0RCrbXk5jmthQLyrqeg15TBVCE tW5uh0R5rvYd+fb6POOlyksmbV6DSeX/xGvv43wC+Ib2P8+ZI9U+iu9/Zn5dVREJDIge qjErj3UxcM88hP/iX2XAzSk9a8uRLsTcXSjYkRUNXv0Rk3pouTh7cdXAag7xcmX86Sd7 foxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678652132; 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=G/Qr7JQKwY1aEHaHum0I31e8nLbOslObM7iZqQbIxUA=; b=ZUoDMdpHZwXXU5mMRDNSMN7d6kQTWdPj0GAoh0BAG/uswIMXAwfY0x7gR3n5jTeqQ8 lpux+KajN27stJnrxvW4hdNhmf/soRxm/lDvM3fgVAESHKsuX3RQS///MGqQALpp0Q3n 4r44p2EXLWWpBHQlzF25ZReAv3E5ypAWIhSfMMQTkpMh12t08C/kiPAi39s5sIwpEBhF wLDk1pmxuzIsROmYtUtjk9KNjHQwipTCvOSfCj2paOirTq9vRMK3ks+hn0gX9WHsTFDU xt356lT/OL5CLuRcDNLI5lu6c1WSiOZbZRIdGttf8+meEELl4gB/pTSFB1yNu+iPEl9p BzbQ== X-Gm-Message-State: AO0yUKWmUSgtBMChlWmMPf8mhSrGm10jqk7CtKTL+hEmbq/BP5/zxRYp OkTEQ88dRf66TphcwydKkohj3hiAlCYedg== X-Google-Smtp-Source: AK7set/DUCAvQfolXLYNRL2xRmd7bdBDyIyeND3zzQ6NjAb+xSg0GTL7Qp8nt/Z9j4edcmXprmLFMA== X-Received: by 2002:a17:907:8691:b0:8b1:3009:536b with SMTP id qa17-20020a170907869100b008b13009536bmr39996464ejc.29.1678652132771; Sun, 12 Mar 2023 13:15:32 -0700 (PDT) Received: from titov.fritz.box ([216.24.216.227]) by smtp.gmail.com with ESMTPSA id hz17-20020a1709072cf100b008dceec0fd4csm2570344ejc.73.2023.03.12.13.15.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Mar 2023 13:15:32 -0700 (PDT) From: Andrei Rybak To: git@vger.kernel.org Cc: Junio C Hamano , =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBC?= =?utf-8?b?amFybWFzb24=?= , Michael J Gruber , Jeff King , Patrick Steinhardt , Michael Haggerty Subject: [PATCH v1 5/7] t1400: assert output of update-ref Date: Sun, 12 Mar 2023 21:15:18 +0100 Message-Id: <20230312201520.370234-7-rybak.a.v@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230312201520.370234-1-rybak.a.v@gmail.com> References: <20230312201520.370234-1-rybak.a.v@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org In t1400-update-ref.sh test 'transaction can create and delete' creates files "expect" and "actual", but doesn't compare them. Similarly, test 'transaction cannot restart ongoing transaction' redirects output of "git update-ref" to file "actual", but doesn't check its contents with any assertions. Assert output of "git update-ref" in tests to improve test coverage in t1400-update-ref.sh. Signed-off-by: Andrei Rybak --- t/t1400-update-ref.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/t/t1400-update-ref.sh b/t/t1400-update-ref.sh index cf58cf025c..4d66cd7f4a 100755 --- a/t/t1400-update-ref.sh +++ b/t/t1400-update-ref.sh @@ -1568,6 +1568,7 @@ test_expect_success 'transaction can create and delete' ' EOF git update-ref --stdin actual && printf "%s: ok\n" start commit start commit >expect && + test_cmp expect actual && test_must_fail git show-ref --verify refs/heads/create-and-delete ' @@ -1595,6 +1596,8 @@ test_expect_success 'transaction cannot restart ongoing transaction' ' commit EOF test_must_fail git update-ref --stdin actual && + printf "%s: ok\n" start >expect && + test_cmp expect actual && test_must_fail git show-ref --verify refs/heads/restart ' From patchwork Sun Mar 12 20:15:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Rybak X-Patchwork-Id: 13171809 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 1BFB7C6FA99 for ; Sun, 12 Mar 2023 20:16:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231287AbjCLUQ1 (ORCPT ); Sun, 12 Mar 2023 16:16:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48268 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230294AbjCLUQK (ORCPT ); Sun, 12 Mar 2023 16:16:10 -0400 Received: from mail-ed1-x536.google.com (mail-ed1-x536.google.com [IPv6:2a00:1450:4864:20::536]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A56672BEEE for ; Sun, 12 Mar 2023 13:15:35 -0700 (PDT) Received: by mail-ed1-x536.google.com with SMTP id da10so40920860edb.3 for ; Sun, 12 Mar 2023 13:15:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678652134; 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=nQExbRQZKm3tG9C0lSv5cVADHSsXEU7dJ1PmSdH9dJ0=; b=nIKyCROu8DCoaIISmzO27Tsm9TKzxRtjQiRxCxqG6F5pcpMbzHAKabIs3kBoN6+jOo SC/NwB3mf0GFANJTXbXnVtRInk4oxchlXgmc7RE4AVRiMBYlEWY8fK4UhPxkSVB3BO6G Z9WJW5+0bRf34Xd78Me8dH5xPA8ugY+dcWODi1MYco1MjvlU8blscf1QUms+7wc4TITi xeQbiKzQSn3vB8iekFo/GFCz1e+TBAUSWQG2H81ocw5EaE6ByWLl5adDY4+4OCDuHDSW LLPVpt1QsBmiVQiOgOZ49OB5xBxS7gd+Pwa6fVIBWF0wk22sF4QnNid6QZNsUTkcSLiY 6L9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678652134; 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=nQExbRQZKm3tG9C0lSv5cVADHSsXEU7dJ1PmSdH9dJ0=; b=TfqzMF1q0mRXC2egkjbNrrA96J/NxsC9lodOqbT9An9ZOqLaVXsJD41ALlRk0tacoM L4BsA3W7DcNwswovyC3tux2+rTwzJbQ20U4GLMvAhX0NHCpJQDsnOTXqWGVfX8qtCaQz ao+CbNLmSWV2Qm4MDhaaOHkhE0x7PaWO+6vE0KGByKd6d5D/jzeqFEWT08qgXw9CbNB6 b28WCGIIQkBB2+A3G39G70m1dDrSmOrUX/lV1C9SVDYbMDK2zvxazR8BJimA606ILaoC yKnvaZXPjrLMHPOwossmz5c8q4csjcA4eZU+PWUPjWhsmCplKX4icOb/9VOyftOrtQ9X TPWQ== X-Gm-Message-State: AO0yUKUndQr84L027cGrs7DtQAPHS0p5Cs0+vL+iOU6SCWeDlnkmO/bI m7UE6uexAjVNqdPoYgDDiyL7qKILdyzL0w== X-Google-Smtp-Source: AK7set8nFFj+NCU+MxMJ7gujFzeufKgD52fRtFDZFznRJhfNQZDsYsNTswQaepDE8zi83AzWdHI2wQ== X-Received: by 2002:a17:907:8a0c:b0:8b1:800b:d2e9 with SMTP id sc12-20020a1709078a0c00b008b1800bd2e9mr39715222ejc.56.1678652134060; Sun, 12 Mar 2023 13:15:34 -0700 (PDT) Received: from titov.fritz.box ([216.24.216.227]) by smtp.gmail.com with ESMTPSA id hz17-20020a1709072cf100b008dceec0fd4csm2570344ejc.73.2023.03.12.13.15.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Mar 2023 13:15:33 -0700 (PDT) From: Andrei Rybak To: git@vger.kernel.org Cc: Junio C Hamano , =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBC?= =?utf-8?b?amFybWFzb24=?= , Michael J Gruber , Jeff King , Patrick Steinhardt , Michael Haggerty Subject: [PATCH v1 6/7] t1404: don't create unused file Date: Sun, 12 Mar 2023 21:15:19 +0100 Message-Id: <20230312201520.370234-8-rybak.a.v@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230312201520.370234-1-rybak.a.v@gmail.com> References: <20230312201520.370234-1-rybak.a.v@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Some tests in file t1404-update-ref-errors.sh create file "unchanged" as the expected side for a test_cmp assertion at the end of the test for output of "git for-each-ref". The filename conveys the expectation that the output won't change between two invocations of "git for-each-ref". Test 'no bogus intermediate values during delete' also creates a file named "unchanged". However, in this test the reference is being deleted, i.e. it _does change_. The file itself isn't used for any assertions in the test. Don't create the unused and slightly misleading file "unchanged". Signed-off-by: Andrei Rybak --- t/t1404-update-ref-errors.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/t/t1404-update-ref-errors.sh b/t/t1404-update-ref-errors.sh index b5606d93b5..937ae0d733 100755 --- a/t/t1404-update-ref-errors.sh +++ b/t/t1404-update-ref-errors.sh @@ -551,7 +551,6 @@ test_expect_success REFFILES 'no bogus intermediate values during delete' ' git update-ref $prefix/foo $C && git pack-refs --all && git update-ref $prefix/foo $D && - git for-each-ref $prefix >unchanged && # Now try to update the reference, but hold the `packed-refs` lock # for a while to see what happens while the process is blocked: : >.git/packed-refs.lock && From patchwork Sun Mar 12 20:15:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Rybak X-Patchwork-Id: 13171810 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 CF929C74A4B for ; Sun, 12 Mar 2023 20:16:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231290AbjCLUQ3 (ORCPT ); Sun, 12 Mar 2023 16:16:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48174 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230311AbjCLUQK (ORCPT ); Sun, 12 Mar 2023 16:16:10 -0400 Received: from mail-ed1-x531.google.com (mail-ed1-x531.google.com [IPv6:2a00:1450:4864:20::531]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 02D112BF06 for ; Sun, 12 Mar 2023 13:15:36 -0700 (PDT) Received: by mail-ed1-x531.google.com with SMTP id y4so11365278edo.2 for ; Sun, 12 Mar 2023 13:15:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678652135; 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=dahJb6X3XDb5sqiV9zJ908D8eprzKYpu55scL5EAGRE=; b=Qd3D0WBtBzP6o/flojT8/H67gRQRp2L2zyMPV2B8kEdf+YUgROHXeTy/jbyKva2y7u iPQPGtURMFCAtRs8S7ed/mIcKZCuKuIP+dZDk2F4t9mM804DVmWmyX+UtwFHZBoY4oei sggdfZeNX0xUjezV+ImGTS1AzuYiZ1mjmJpuS2gobIpVL5Nk07h53c3muUfjDxEDN7SU C8laGSA8WLo2XPa/iUlWNcWHaTRXStrlGJXo46JvOAinCfHaig7nkyGnaKeeX4Vkjqe6 pM56Q7O0U2PFB8yfDjXEvdB3sPuR/vrbmB04D+CmjFI181RPthPD+3v5TNwLUlKu3AUI 7umw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678652135; 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=dahJb6X3XDb5sqiV9zJ908D8eprzKYpu55scL5EAGRE=; b=vMqRJVT1tkU/D+Cx7B13hdGy0Up7dr2u0jRHv47WzmjVRvU8dCVlzgqb0aTcoqyVIE iqhOoNH+iIFiddaRmQ/0LWbk5hGNAHtVflaPUis51NFL2Jg5/HpIJrHjy4N/aBNHbNTR S61gEELWlKirqgFS4kHF0cebG5th89TLWYCr89H5fft1gn8ENU3IGC2ihM5CumgRC4aH 8SNeSQfi/TyTjmjE2CfXEG98/RNEUoZUpl7g4pri0SxYsQIGOBDtjjwiwoZrGxRdg08p Iec9eBk2sWHwBq84ad3P3DDP5gUIFahet1fNWtxMPdj8HqJZqnGyYFUeISc/2tKUIZRH M4XQ== X-Gm-Message-State: AO0yUKXyhC/OPd/07cNWsyfCGOxUfqrziif13+kYSMGpcAWGyVYsdMlI stoAIoVcntThPF808qg6mb6v6QZFgrTiqA== X-Google-Smtp-Source: AK7set/A6twFyWXKsYOoyVDdpoTM9Ly3kL83ZW/MM6p0vif85vyy2poAX7GZY0O+/Oxc3ImTfQX6bw== X-Received: by 2002:a17:906:6a1f:b0:91f:1e81:89d9 with SMTP id qw31-20020a1709066a1f00b0091f1e8189d9mr6470802ejc.43.1678652135416; Sun, 12 Mar 2023 13:15:35 -0700 (PDT) Received: from titov.fritz.box ([216.24.216.227]) by smtp.gmail.com with ESMTPSA id hz17-20020a1709072cf100b008dceec0fd4csm2570344ejc.73.2023.03.12.13.15.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Mar 2023 13:15:35 -0700 (PDT) From: Andrei Rybak To: git@vger.kernel.org Cc: Junio C Hamano , =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBC?= =?utf-8?b?amFybWFzb24=?= , Michael J Gruber , Jeff King , Patrick Steinhardt , Michael Haggerty Subject: [PATCH v1 7/7] t1507: assert output of rev-parse Date: Sun, 12 Mar 2023 21:15:20 +0100 Message-Id: <20230312201520.370234-9-rybak.a.v@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230312201520.370234-1-rybak.a.v@gmail.com> References: <20230312201520.370234-1-rybak.a.v@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Tests in t1507-rev-parse-upstream.sh compare files "expect" and "actual" to assert the output of "git rev-parse", "git show", and "git log". However, two of the tests '@{reflog}-parsing does not look beyond colon' and '@{upstream}-parsing does not look beyond colon' don't inspect the contents of the created files. Assert output of "git rev-parse" in tests in t1507-rev-parse-upstream.sh to improve test coverage. Signed-off-by: Andrei Rybak --- t/t1507-rev-parse-upstream.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/t/t1507-rev-parse-upstream.sh b/t/t1507-rev-parse-upstream.sh index c34714ffe3..4458820168 100755 --- a/t/t1507-rev-parse-upstream.sh +++ b/t/t1507-rev-parse-upstream.sh @@ -258,7 +258,8 @@ test_expect_success '@{reflog}-parsing does not look beyond colon' ' git add @{yesterday} && git commit -m "funny reflog file" && git hash-object @{yesterday} >expect && - git rev-parse HEAD:@{yesterday} >actual + git rev-parse HEAD:@{yesterday} >actual && + test_cmp expect actual ' test_expect_success '@{upstream}-parsing does not look beyond colon' ' @@ -266,7 +267,8 @@ test_expect_success '@{upstream}-parsing does not look beyond colon' ' git add @{upstream} && git commit -m "funny upstream file" && git hash-object @{upstream} >expect && - git rev-parse HEAD:@{upstream} >actual + git rev-parse HEAD:@{upstream} >actual && + test_cmp expect actual ' test_done