From patchwork Fri Mar 24 20:54:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Rybak X-Patchwork-Id: 13187378 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 0782FC76196 for ; Fri, 24 Mar 2023 20:54:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232191AbjCXUyo (ORCPT ); Fri, 24 Mar 2023 16:54:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56296 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231579AbjCXUyl (ORCPT ); Fri, 24 Mar 2023 16:54:41 -0400 Received: from mail-ed1-x534.google.com (mail-ed1-x534.google.com [IPv6:2a00:1450:4864:20::534]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BDDB455AD for ; Fri, 24 Mar 2023 13:54:39 -0700 (PDT) Received: by mail-ed1-x534.google.com with SMTP id x3so12587380edb.10 for ; Fri, 24 Mar 2023 13:54:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679691278; 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=p7k/lcP0By6gbC7MFqksaAdhGbjPogHyvJ00FCXooYA=; b=OsplpOeAItl3suOMKFhpkE4stuGTPzKJ0ps/yNrAMZG/heZqNb0z9xX3f7CTdglnJE oD8glFLKrweOL7NrWy8DvFh8y/TdLh/JzLYjnwVtqIHe51o/3tA3UQbU+tyE6wP6tYeB grgJ1eFdUPIph1NH1fWwk+yPshOaLUICoL/qXFtcSmb6MaF/8MCzTapB/7R8YSZ2os47 If/Q2W/njSn/BBHmHnB8UdlJYH85hNrQ58nxLe8gbp9JbcaDrrMVg7L+Hr+m2RdbbWro u3pQcBckFMLm8DMs+I4BlQrRZ4rOZRRCs/SsBER/DP6TaYSqDpvunS+IQz8aD5JbY4uz FVvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679691278; 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=p7k/lcP0By6gbC7MFqksaAdhGbjPogHyvJ00FCXooYA=; b=Belo+ojGyeK699mAl6+Z3qMY+Jav+Rc9JhC8nrxnqqfqwZc9xUzUFWUDWQWWGTMdu6 w8Sji7c0CBZskeKfJkWo1wOfMxgGsM3ZN5BPnZdpx+PifAWPUKBI4hukVu2zuaPVn7Uq U65PoCvgdgSVpO0++i4lzb0ddHe+Bc1oEVddKvfpUfhfgNu0xmNeI33BPO907CDnNNVu qCGzpLmZLuLXvQk6dteQ9+h5p6RxeF1pMHMTRd6O/PTMGcAM+e8xbK/vY4JTPNUmLRL3 nCqT2NM5B94UPpgSjEy2ZKdcKMjLYhwxpiuHFnkR4hgJn8kat4ifAYJbKT050/xkZjH6 DXFQ== X-Gm-Message-State: AAQBX9eB8zULmplCJm3Lb29KZBkm5Suziv9oyiS/eW/Cylvyfz/y1KAP Yw4c6TNIsJRH11r8ChTNbsTWyCFEifV2cgdY X-Google-Smtp-Source: AKy350acSne/0SbZSx2FD9Qihtu3wg+P0vq9anvMjt+ykGvpac1SiyapovEKX77W1/kBrGzccoZTIw== X-Received: by 2002:aa7:c141:0:b0:4fa:ada1:796d with SMTP id r1-20020aa7c141000000b004faada1796dmr4278818edp.10.1679691277894; Fri, 24 Mar 2023 13:54:37 -0700 (PDT) Received: from titov.fritz.box ([212.102.57.11]) by smtp.gmail.com with ESMTPSA id e22-20020a50a696000000b005021c7f08absm2007099edc.29.2023.03.24.13.54.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Mar 2023 13:54:37 -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 v3 1/7] t1005: assert output of ls-files Date: Fri, 24 Mar 2023 21:54:28 +0100 Message-Id: <20230324205434.93754-2-rybak.a.v@gmail.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230324205434.93754-1-rybak.a.v@gmail.com> References: <20230312201520.370234-1-rybak.a.v@gmail.com> <20230324205434.93754-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 Fri Mar 24 20:54:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Rybak X-Patchwork-Id: 13187379 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 7A1C1C77B61 for ; Fri, 24 Mar 2023 20:54:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231933AbjCXUyq (ORCPT ); Fri, 24 Mar 2023 16:54:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56342 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231774AbjCXUym (ORCPT ); Fri, 24 Mar 2023 16:54:42 -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 7948E83FB for ; Fri, 24 Mar 2023 13:54:40 -0700 (PDT) Received: by mail-ed1-x535.google.com with SMTP id r11so12703859edd.5 for ; Fri, 24 Mar 2023 13:54:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679691279; 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=JITnsuY6OWNihaQQx6852KQnHdY75qS3xQLdiSqOTf0=; b=Kqo+n56KfzRIba/AwrG1cMJp096iof07lJn/Zz8pfuiA2Gp8Vs8LjSIxkTu3tTLe0J LvvJjn02P09+czNuPak53EYipvufyFYRBTRpbEX4xL8ZC9PcRYxECuTLr2ilqY9Rf8Id 7Aw2CSt4lNgHroHR8ZhYFXkL2C1Xq1JXZ525kRafF8WdP09m6pmMMnkGBrTbxOCpUUIA lmHPw29Q/dFEmNM3Bc5bDqe8kSs2sOMfMRAAwM8qujp0F73tH9Mt/Ogq9Cx0EBKovvB6 3PCfMSu0ZsJ32BZ8E7Q4fVVyISwDxOJkBUWrGlsSNrACmqpvtUCjiJ6DZ4d21w1rOm2u eRHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679691279; 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=JITnsuY6OWNihaQQx6852KQnHdY75qS3xQLdiSqOTf0=; b=Pb2bN0o9CXX7aZglRUw1ZXVXQCBS3TIShBHd1FCCjDyBbYYAyBaWZUpuFDQS3/htkL K4GfVT5uuPy+U7CLhYioCDX8g2ZYJSZjgDn9WdPl38FsTIw0T0rwqvdT27Fdi0tyagAG PJsd712WqJBs0aOb9inFMJ2tOrhb3jhdTWLOkRW7PQLkNMe5zhnOcb6UyURWS+Ah1Xzh FSkSoNhEucr6rYVLyj2m9RCuu2Dq/KIjGffJdF2HWNo/1F/D4AYI9pX06/vynNrijJoA RfWuHjFiAvqWD/lIN7MY7B0CKIkh6i6GgkMHPyDjVf7xvwMSxXDnJBdqO0yuXjrE5uI7 vfWw== X-Gm-Message-State: AAQBX9dmIsUCNx1y8vwn43WGJNDX24Ig0iwP9e3jT2DRgsZo5UtTNTqJ psfIXAxThZvITeBjpLf1i0ozl+wQjrzymIEV X-Google-Smtp-Source: AKy350b049V4V0qMVINaTMLuHD1gc+/NdjY+nYZboe3AuWioxYhcsGDJtX7wfaxxCE943E5mblYl0A== X-Received: by 2002:a05:6402:114b:b0:4fa:57bf:1416 with SMTP id g11-20020a056402114b00b004fa57bf1416mr3964187edw.35.1679691278865; Fri, 24 Mar 2023 13:54:38 -0700 (PDT) Received: from titov.fritz.box ([212.102.57.11]) by smtp.gmail.com with ESMTPSA id e22-20020a50a696000000b005021c7f08absm2007099edc.29.2023.03.24.13.54.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Mar 2023 13:54:38 -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 v3 2/7] t1006: assert error output of cat-file Date: Fri, 24 Mar 2023 21:54:29 +0100 Message-Id: <20230324205434.93754-3-rybak.a.v@gmail.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230324205434.93754-1-rybak.a.v@gmail.com> References: <20230312201520.370234-1-rybak.a.v@gmail.com> <20230324205434.93754-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 Fri Mar 24 20:54:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Rybak X-Patchwork-Id: 13187380 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 1417AC76195 for ; Fri, 24 Mar 2023 20:54:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231926AbjCXUys (ORCPT ); Fri, 24 Mar 2023 16:54:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56344 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231897AbjCXUym (ORCPT ); Fri, 24 Mar 2023 16:54:42 -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 444415FF9 for ; Fri, 24 Mar 2023 13:54:41 -0700 (PDT) Received: by mail-ed1-x531.google.com with SMTP id cn12so12711135edb.4 for ; Fri, 24 Mar 2023 13:54:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679691279; 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=jTQxLyNjl4laCwmeKfpVSFxQ6sWy7Mb7svkCHfDZrMM=; b=Sj3t+igGmry8okDDE3br302aDMKQK9qoBvBuOUA2k/qtBH4bsmeZcb8D+GI3fQEBWo lmMKz5E830sZzU/3IZ8N+TTKPT+FdSs+WrsJZPGLTH6yTQ/yZPraWiLn/NQXZoWOgkjN +UTBDtUHUE78t7OdtTAbFEPIIppJUJCsqg1K7K+pCgHE8LnMXzguB2Y6fquajmAqBvIe Rxuz7Sez4vi2YzvPtFVzPXFmTR1TOmQoge0oOAgNSEuS0aIBURraonOtF3fgDa/T7gPT Mk12tXIQVLCg1VuyKWWpJloDOzDtpteJxtvWlzXRfloswb1BOBxd2OZrlpHdl6X3+rqx 1jnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679691279; 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=jTQxLyNjl4laCwmeKfpVSFxQ6sWy7Mb7svkCHfDZrMM=; b=H3wvd4/JvmgNp6rt7auYOuskUK5TtxOCjdFxDeWa+bdkWgQcvZ0OSn34P0kxOTWjjr Tk4THSxx3rkTyZmb3i85j/pp2gQFFiagnEq70oHBb99na+c+aRUjW5N82/ryy28wIQQW Ghy94nAqzdP45Inyilj6hdg6a0/S92IlWQjeJHnk5h8vGy+qFnT7j7f3EEQbwqLg15fg Oyit+pIqcwlXU/LbmI0u2LFsKW5JeD/WL10c0IQb+cqjfpSwsHuwzAgetCLGcqUNpl24 DBqwbIKcDKy1fr7eXFP3CEyxqWg5keq9viZvVYN/v4mDfFkEQFb3NCoV/s+qAXY3HlQB 6qyg== X-Gm-Message-State: AAQBX9d/RNJ+VQ14l6AdFZol9nRUmzfN0vA2N41+VN6fPsFOBipkwEk7 XvDiN0cQSkjGN1mUm/fvMimor6vqAjue4Rx5 X-Google-Smtp-Source: AKy350Y10UOnUy80CEABLIiVsqbmpNlbJW87ZyFUjY9WQwDW0LpEUHB05I07cdKFXsUeDVTWI2mCBQ== X-Received: by 2002:aa7:cd12:0:b0:4fd:20ee:225d with SMTP id b18-20020aa7cd12000000b004fd20ee225dmr3821044edw.24.1679691279611; Fri, 24 Mar 2023 13:54:39 -0700 (PDT) Received: from titov.fritz.box ([212.102.57.11]) by smtp.gmail.com with ESMTPSA id e22-20020a50a696000000b005021c7f08absm2007099edc.29.2023.03.24.13.54.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Mar 2023 13:54:39 -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 v3 3/7] t1010: don't create unused files Date: Fri, 24 Mar 2023 21:54:30 +0100 Message-Id: <20230324205434.93754-4-rybak.a.v@gmail.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230324205434.93754-1-rybak.a.v@gmail.com> References: <20230312201520.370234-1-rybak.a.v@gmail.com> <20230324205434.93754-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. Don't redirect output of "git mktree" to file "actual" in tests that assert that an invocation of "git mktree" must fail. Output of "git mktree" is empty when it refuses to build a tree object. So, alternatively, the test could assert that the output is empty. However, there isn't a good reason for the user to expect the command to be silent in such cases, so we shouldn't enforce it. The user shouldn't use the output of a failing command anyway. Signed-off-by: Andrei Rybak --- t/t1010-mktree.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/t/t1010-mktree.sh b/t/t1010-mktree.sh index 3c08194526..22875ba598 100755 --- a/t/t1010-mktree.sh +++ b/t/t1010-mktree.sh @@ -60,11 +60,11 @@ 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_fail git mktree X-Patchwork-Id: 13187382 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 53AB2C6FD20 for ; Fri, 24 Mar 2023 20:54:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231444AbjCXUyu (ORCPT ); Fri, 24 Mar 2023 16:54:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56362 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232018AbjCXUyn (ORCPT ); Fri, 24 Mar 2023 16:54:43 -0400 Received: from mail-ed1-x534.google.com (mail-ed1-x534.google.com [IPv6:2a00:1450:4864:20::534]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 758A849E1 for ; Fri, 24 Mar 2023 13:54:42 -0700 (PDT) Received: by mail-ed1-x534.google.com with SMTP id b20so12764654edd.1 for ; Fri, 24 Mar 2023 13:54:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679691280; 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=1vG1kNPwjsqbMj1d58BRaDxcD8X8R5R92P+u/4DJ1KU=; b=UaGj8WbEhnq31znZkWJ37VVqNxCoU06iOGHh678ZJ77fBRxyeqSzSHiZFHMGkP9KFg 2ABk+eEcKR+rdaBvLPQN4Ha0krP4/mZ5n9kl6ywHYZrbow/LUPkHwaxnnSE+88xLMhXe rDnDSIUNfSoyE4KMMNisvgkCtiEExU/Jjw17t5g/sTlnoeQ26N/yDMEU23WrJFmeHfHB mhKR7AiBobRisjzgkZHc7dW5+X65TzYfGBMAWm6KrqQpKYym5PmkzT95gVR+fkM7hN1L GewTaGvmrBG+yX5fnjpVlYksKeJ4u/YwuqNTu5adUMf/y7HqU+jbmYT51Cgshnibiyv/ atqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679691280; 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=1vG1kNPwjsqbMj1d58BRaDxcD8X8R5R92P+u/4DJ1KU=; b=iGfzs784x43f7TBkgaIzOcCk3TLKYvBYraWDy41kRN4b+Qti9GQHOChdmkvaR65uav HPjhJ6vBmpzNQ1jGC6XEi3JvfXqR9WMWVZz19DnzLvKwa/uqhh8HHIiDDTfr+XGuOFnC c33t2zDlVAI6+BVI0kbd0/wP3FdK+iQR0KFzqBrhdyeLLR4mnk0yNOGqJUFIJ7LFo5Zo QHgi2e7VWB7Rnl7YPGtMxbNWAq5byZkaryolRZaqN+xxnPX4wrPMD/evi+in4eUUkWdh Z4Gdz8x3dtEHttJLGRLLVaOFfFFmkOj2GzUC+FclzKwx0BdGIe7uRv623KOksDsvbcuA qGaQ== X-Gm-Message-State: AAQBX9fpJI+L1cUyK9ciWb8OLWr6YT+7G8Nq7bTV6Znlt4i8+VlZ1Oui nlLRwdRJVJs2Qf+6GpYZvyGzS+per+GqKydk X-Google-Smtp-Source: AKy350ayMvgfPLSb6fpXUxHdiTBMCXPq7NnIwsepQbI8DKlQ+1V28YzLfDEgQWfsgWrtEvbqswxKpg== X-Received: by 2002:a05:6402:8cf:b0:501:d43e:d1e3 with SMTP id d15-20020a05640208cf00b00501d43ed1e3mr4725357edz.8.1679691280306; Fri, 24 Mar 2023 13:54:40 -0700 (PDT) Received: from titov.fritz.box ([212.102.57.11]) by smtp.gmail.com with ESMTPSA id e22-20020a50a696000000b005021c7f08absm2007099edc.29.2023.03.24.13.54.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Mar 2023 13:54:40 -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 v3 4/7] t1302: don't create unused file Date: Fri, 24 Mar 2023 21:54:31 +0100 Message-Id: <20230324205434.93754-5-rybak.a.v@gmail.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230324205434.93754-1-rybak.a.v@gmail.com> References: <20230312201520.370234-1-rybak.a.v@gmail.com> <20230324205434.93754-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 Fri Mar 24 20:54:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Rybak X-Patchwork-Id: 13187381 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 664FCC7619A for ; Fri, 24 Mar 2023 20:54:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232289AbjCXUyw (ORCPT ); Fri, 24 Mar 2023 16:54:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56402 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232196AbjCXUyo (ORCPT ); Fri, 24 Mar 2023 16:54:44 -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 8CFB97296 for ; Fri, 24 Mar 2023 13:54:43 -0700 (PDT) Received: by mail-ed1-x529.google.com with SMTP id ew6so12630463edb.7 for ; Fri, 24 Mar 2023 13:54:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679691282; 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=4+A+b3B3UPCEjSrHXwNe8NmkbubLWcX51P1W/Kdr7Rg=; b=Iprd9yglTy6uzLWNlmpVUQ6HemEyPtlfgqSE57WJQgCDPE0cWKsYHTaIjn3jprlPTj /+ZpZ/G4CY8u0F5Pr+00bWoqxXuzbaqhdUCLjeSSzV80xEjIboeKq6g6S0Lr1LaFdC1r jSmFRToan6JG2od0iBot4c4j5BsqLRxoFn8qsXb4lrc2NHyJquoTZ1JgYO6lpXvF9jLT 6F8fqh9pdVVyS3VO8wxU/VJW3v/HMGczZMRoCF8Dvc4XcXeYL7njcUAq2x6+btPCKmG8 CzdQkt9Iio/aVQ4Ix3BAh9jNCRxW/rhOZIo9rfJjuKOZtf9+XxAgcAYE7LO1UTqJiE8e 6M2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679691282; 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=4+A+b3B3UPCEjSrHXwNe8NmkbubLWcX51P1W/Kdr7Rg=; b=Uh9LP9aIiVo/NwChbFot5A6krvwdhCaNXKqvtfxKnoTArgoGGe3nnntoGhVVw1YLpY GLcDH8Xk750IeCSvMe984DMaeeOoeChZv1hJTeOFxd2QwZGJ3qYbIvuxorRL1Ch8LD86 iDQNoRlsm2nVlkevg7/chb1ApUK8ODtLfcOysKYG6mC7jpr7HIzRPU64sQnFMmM3endQ bDdF/cbFzg8eIpHuWJeAAq8AjSrddAX+GMdhfGs7XCcDMYj9SeBQ8L1yz0FFJ9Mdi0NJ at2fh6WQlhJM7aJEdm+thoWKQ8of64bfisZ9OAAXn0rKASknc1/U3pmZQN77d7Fab9Xf LAkA== X-Gm-Message-State: AAQBX9d9OpjqETRLoxWDJebUHXJiWxUM3/dgC2yv2eDL7PMrzQmT22aZ gnt10dh2uO/iYhzzoHciO7e1iN0m9DwBWXFG X-Google-Smtp-Source: AKy350YE7HMs+BLTk6niwJ48PEYLNzsTP0zLu4UMdbaI4uC5+PXUpYhUJxmLZsu1bc35iLzr7LIMGw== X-Received: by 2002:a05:6402:742:b0:4ad:738b:6706 with SMTP id p2-20020a056402074200b004ad738b6706mr4493047edy.2.1679691281648; Fri, 24 Mar 2023 13:54:41 -0700 (PDT) Received: from titov.fritz.box ([212.102.57.11]) by smtp.gmail.com with ESMTPSA id e22-20020a50a696000000b005021c7f08absm2007099edc.29.2023.03.24.13.54.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Mar 2023 13:54:40 -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 v3 5/7] t1400: assert output of update-ref Date: Fri, 24 Mar 2023 21:54:32 +0100 Message-Id: <20230324205434.93754-6-rybak.a.v@gmail.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230324205434.93754-1-rybak.a.v@gmail.com> References: <20230312201520.370234-1-rybak.a.v@gmail.com> <20230324205434.93754-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 Fri Mar 24 20:54:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Rybak X-Patchwork-Id: 13187383 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 77225C6FD1C for ; Fri, 24 Mar 2023 20:54:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232306AbjCXUyy (ORCPT ); Fri, 24 Mar 2023 16:54:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56400 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232206AbjCXUyo (ORCPT ); Fri, 24 Mar 2023 16:54:44 -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 617B565BA for ; Fri, 24 Mar 2023 13:54:43 -0700 (PDT) Received: by mail-ed1-x529.google.com with SMTP id er18so1445862edb.9 for ; Fri, 24 Mar 2023 13:54:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679691282; 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=LDaPxSGgIUOG1uM2q0vvMxPBkJdqqLH8giy72dWAzag=; b=VXELx8ZYWfP8khnKaQujAZng1N4EXN6ubOMmIqIU0CzqcLTG/hLLeBKMw03OrrCoXt vmQNDefez0KCBfIXmYN+vy1MSLsZ+G5FqdNGKoXV4kIGajbuIJFFCEerCG3EzS+ef44U qSvwyAgdtIlafYC2xoWY+w+3r1yUg9xMaQlFlXg25dyFjeRwwTMxFNLw842wx63rqAAM sfnEYV2HjwlbTCF3RCVGqeKAIUrGI1Xswr5tLFLdLBlCVgreeuyXsdrtpskldNVxYVNq 1MqqvDB3j9ZkKOAx4eunzaQTC06wuXWAdKQlpdTcBCjlNfleG47k6nOHFYQbo7BF9+7s TZFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679691282; 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=LDaPxSGgIUOG1uM2q0vvMxPBkJdqqLH8giy72dWAzag=; b=qwfCIIS5Exz+++Z0DASoYWD3sqeWDMcF4M7Ij+2SgUHqOwCzRGIb+hRAKClX8vu6Ak COuYdwDG0/zGaU4/lfiwza/ztQhqfTkuJL1pVfQUqVYyAZFPYV758rksNmg5cmIa+UTr qrO/HhrMLd2AwGWs9k/r2obdJy0BF1Igf5RkzXfsNBlbmC431rlyifxM8TYEhvDi7S2w SSas6LrvVsbJV/amwO0RdQTBk10S1SwRZ+NsFaQ5+w71BCi5nDlItdh/eauB2w2ti/U9 pIMZcoWnbi4LOgSUWbL/rYPppQpZDCzwh3GLFDopKdEDLBN9jduKvtgLZ6TwHyIueJxM 2pvw== X-Gm-Message-State: AAQBX9cI+ABIGToVJiqv7j6UvQCRSpYSTt0cYMeQ+KytQYCpAHtKDfAn iRm3Oerd8NUTqnr/N0iDvnxt43ySDaYAyqBK X-Google-Smtp-Source: AKy350bf/emhKpDr3VzbBAZyAr51liEC2qJFxMP/0DreiX6+ge698p/vKIt1VF0j3tkl50mVIjYM6w== X-Received: by 2002:aa7:da56:0:b0:4fd:2363:16f2 with SMTP id w22-20020aa7da56000000b004fd236316f2mr4027915eds.37.1679691282640; Fri, 24 Mar 2023 13:54:42 -0700 (PDT) Received: from titov.fritz.box ([212.102.57.11]) by smtp.gmail.com with ESMTPSA id e22-20020a50a696000000b005021c7f08absm2007099edc.29.2023.03.24.13.54.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Mar 2023 13:54:41 -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 v3 6/7] t1404: don't create unused file Date: Fri, 24 Mar 2023 21:54:33 +0100 Message-Id: <20230324205434.93754-7-rybak.a.v@gmail.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230324205434.93754-1-rybak.a.v@gmail.com> References: <20230312201520.370234-1-rybak.a.v@gmail.com> <20230324205434.93754-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". Test 'no bogus intermediate values during delete' also creates a file named "unchanged" using "git for-each-ref". However, the file isn't used for any assertions in the test. Instead, "git rev-parse" is used to compare the reference with variable $D. Don't create unused file "unchanged" in test 'no bogus intermediate values during delete' of t1404-update-ref-errors.sh. 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 Fri Mar 24 20:54:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Rybak X-Patchwork-Id: 13187384 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 9DAC0C76196 for ; Fri, 24 Mar 2023 20:55:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231960AbjCXUy7 (ORCPT ); Fri, 24 Mar 2023 16:54:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56504 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232271AbjCXUyq (ORCPT ); Fri, 24 Mar 2023 16:54:46 -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 0C043166C0 for ; Fri, 24 Mar 2023 13:54:45 -0700 (PDT) Received: by mail-ed1-x535.google.com with SMTP id eh3so12582098edb.11 for ; Fri, 24 Mar 2023 13:54:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679691283; 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=fBmp1WNBu4l5uyQOZwjLHFcbKQroSBy4oBACTiM2LcA=; b=XVYM9+8+IUhA68S2YT/ubj//zC3vO67lp7XgxHk3Rl6I0JQNAUO1sxZNaQK+KrZFpp bVcVveS55bVaeRG8n92uD/YDxnP9Y2B7WxV3plkf/9GjwE5lQQRgrQDnH6lYfK2UR+nP 4AiPcMjXYY/sIfOPUQmyd7E9pBK+IBtOI5day/forCfDFB0hquX52j31pNVyx6TzAJ3j VT59nPFZjIM6N2aRSRIRqdJWvAIBYdIPrTC6q3EwSWnn8PJqy0s+aLi0LLklJ5fjPk2l +W2/ZzqOveozmeLfWEtykOGNaFi4yuzwxIlPvutpCmaja2pfvYE2hJigfoFtWUEqniyx rtEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679691283; 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=fBmp1WNBu4l5uyQOZwjLHFcbKQroSBy4oBACTiM2LcA=; b=eoqReg736ImiJf8extpIKt3yjh44IcDZOwVKdnSTxCS3CxXV3k0XAChYlTvp3mxLoU LzcXKGuDy8UItKarqAwk5UJHr6bJgz41/4iRdRX2GkEFs8WmAG7lTBESHfuZbf/Ni4OE /SZ5H5+qDO5+kZS5otQ7DrJcvO2QHCnDCuFYp/CfVIkYAaxHDf5bCFH9+V9ALkvEDbiN quaYjo6zCqkwTwIbwxz29PTokUjHmDw2+WICTneoRd6mmlYNsv1HvpXFe84wdTzOPYNm LQDWq+x3Om7aWuZCMjOejKKLsegRvDTdF/LJDMvDZatdqyYVohZ8oYcN1rxaZw1mJkjE /AKA== X-Gm-Message-State: AAQBX9fpiQn3d/byOLHG22bBoO076OjvFGfzdfGCThrTwFF7JbHtOZRm wuBjgro18qrugZISrAKBhtWGbj0QyKr4/a4s X-Google-Smtp-Source: AKy350a7r6Ihbw529jZO66ZA1JvXY+EoEk2qQr6GxxmNGxMiVqn/8u1PTgKqN0FqvTvB6fbLtA82Og== X-Received: by 2002:a05:6402:1285:b0:4fb:6523:2b37 with SMTP id w5-20020a056402128500b004fb65232b37mr4949322edv.15.1679691283373; Fri, 24 Mar 2023 13:54:43 -0700 (PDT) Received: from titov.fritz.box ([212.102.57.11]) by smtp.gmail.com with ESMTPSA id e22-20020a50a696000000b005021c7f08absm2007099edc.29.2023.03.24.13.54.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Mar 2023 13:54:42 -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 v3 7/7] t1507: assert output of rev-parse Date: Fri, 24 Mar 2023 21:54:34 +0100 Message-Id: <20230324205434.93754-8-rybak.a.v@gmail.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230324205434.93754-1-rybak.a.v@gmail.com> References: <20230312201520.370234-1-rybak.a.v@gmail.com> <20230324205434.93754-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