From patchwork Tue Feb 9 21:41:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= X-Patchwork-Id: 12079351 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E1748C433DB for ; Tue, 9 Feb 2021 22:28:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B2B0964DD5 for ; Tue, 9 Feb 2021 22:28:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234487AbhBIW23 (ORCPT ); Tue, 9 Feb 2021 17:28:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59062 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234344AbhBIWXg (ORCPT ); Tue, 9 Feb 2021 17:23:36 -0500 Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AE2FFC0698FE for ; Tue, 9 Feb 2021 13:42:14 -0800 (PST) Received: by mail-wm1-x32e.google.com with SMTP id o24so64145wmh.5 for ; Tue, 09 Feb 2021 13:42:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=v7SlsPaJHgRSLB/ATAtQygxTdFpLK4ADK+gtOv+dIx8=; b=XIqXyavrn4yttR4LFtsyGl3uBYVhdHJZYOPBYcvdNUzfzdbl3e2hAJey0f2/FioWu4 bUFx8wSx//wR6V/CPT2kF5yxJjhDVFM2wLn+5FWchs5h63qCpz5Ht1cxyqFCvGb5Tf4E Z6lfVcw6KQ4gSv6M0hK0a42iONV+yTShEC8jnXs+Q5Qfz1BtcY/ugpbwvUXB1JUiQSTu UHm1cgI35YlHjXSJ7tnw53T6gPPwQSgev2Zv9lJNFSvz++83Bt7JU2R42/7GrXi6tgcI MhLWh2jiyKtJ0sBetA/QwKv0x8e/C7HnT3SoYf53+9N2fdGdk6LhJ749f9lq6nmhFxRq kFzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=v7SlsPaJHgRSLB/ATAtQygxTdFpLK4ADK+gtOv+dIx8=; b=t+0gNdoqZ6wx6Bg7Y/xesPyCgirabHrCArHCFkTqXeqhmyGeYT6OcJJGAwFPoSNCyc tEw2xjm3z00LoSgc3389DJpGMr4XEmLf9pdkQBLZb9qJHAloQQyg/paX4sdeZNzohBY9 xt+50Sds1bzFTxQbkBJm/T6jRnagywZiueCWH/f8FgOCnv/t1cSPSacpGrhrEiUloXUC E9VGaSwBFtadQFpzONX5ClPitTehLc3SA4JDZZSyCQBHlNI0L6e7LwzuGe0SHqdOeGAC rvQGJNa9R1q2bdfs8qFrG4EfXlblqOmCpGcOevd88by0oooJTAxQoVBQXXmy35E/flMZ 3gVQ== X-Gm-Message-State: AOAM530vRaP43jJ6dUl14DzVk5XEgAI0jDovLinLmhMxor/XNVrE53+7 0TFyNOyNGAEvM0wFUMvzRfgMWL6mRUPk2Q== X-Google-Smtp-Source: ABdhPJw8f3ib/281RvAXOOg0b15Ra8P8oKb+gtcK7Nn/6wotyrYHthBfEPGRXMrklGNpX8peMvqOzw== X-Received: by 2002:a7b:c206:: with SMTP id x6mr91679wmi.81.1612906933111; Tue, 09 Feb 2021 13:42:13 -0800 (PST) Received: from vm.nix.is (vm.nix.is. [2a01:4f8:120:2468::2]) by smtp.gmail.com with ESMTPSA id m205sm38710wmf.40.2021.02.09.13.42.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Feb 2021 13:42:11 -0800 (PST) From: =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= To: git@vger.kernel.org Cc: Junio C Hamano , Johannes Schindelin , =?utf-8?q?SZEDER_G=C3=A1b?= =?utf-8?q?or?= , Jiang Xin , =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= Subject: [PATCH 01/12] test-lib: remove check_var_migration Date: Tue, 9 Feb 2021 22:41:48 +0100 Message-Id: <20210209214159.22815-2-avarab@gmail.com> X-Mailer: git-send-email 2.30.0.284.gd98b1dd5eaa7 In-Reply-To: <20210209214159.22815-1-avarab@gmail.com> References: <20210209214159.22815-1-avarab@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Remove the check_var_migration() migration helper. This was added back in [1], [2] and [3] to warn users to migrate from e.g. the "GIT_FSMONITOR_TEST" name to "GIT_TEST_FSMONITOR". I daresay that having been warning about this since late 2018 (or v2.20.0) was sufficient time to give everyone interested a heads-up about moving to the new names. I don't see the need for going through the "do this later" codepath anticipated in [1], let's just remove this instead. 1. 4cb54d0aa8e (fsmonitor: update GIT_TEST_FSMONITOR support, 2018-09-18) 2. 1f357b045b5 (read-cache: update TEST_GIT_INDEX_VERSION support, 2018-09-18) 3. 5765d97b71d (preload-index: update GIT_FORCE_PRELOAD_TEST support, 2018-09-18) Signed-off-by: Ævar Arnfjörð Bjarmason --- t/test-lib.sh | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/t/test-lib.sh b/t/test-lib.sh index 76062db2964..61bda88245c 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -462,36 +462,6 @@ export GIT_DEFAULT_HASH GIT_TRACE_BARE=1 export GIT_TRACE_BARE -check_var_migration () { - # the warnings and hints given from this helper depends - # on end-user settings, which will disrupt the self-test - # done on the test framework itself. - case "$GIT_TEST_FRAMEWORK_SELFTEST" in - t) return ;; - esac - - old_name=$1 new_name=$2 - eval "old_isset=\${${old_name}:+isset}" - eval "new_isset=\${${new_name}:+isset}" - - case "$old_isset,$new_isset" in - isset,) - echo >&2 "warning: $old_name is now $new_name" - echo >&2 "hint: set $new_name too during the transition period" - eval "$new_name=\$$old_name" - ;; - isset,isset) - # do this later - # echo >&2 "warning: $old_name is now $new_name" - # echo >&2 "hint: remove $old_name" - ;; - esac -} - -check_var_migration GIT_FSMONITOR_TEST GIT_TEST_FSMONITOR -check_var_migration TEST_GIT_INDEX_VERSION GIT_TEST_INDEX_VERSION -check_var_migration GIT_FORCE_PRELOAD_TEST GIT_TEST_PRELOAD_INDEX - # Use specific version of the index file format if test -n "${GIT_TEST_INDEX_VERSION:+isset}" then From patchwork Tue Feb 9 21:41:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= X-Patchwork-Id: 12079353 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 49CFFC433E9 for ; Tue, 9 Feb 2021 22:29:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 23AA664E3A for ; Tue, 9 Feb 2021 22:29:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233974AbhBIW2x (ORCPT ); Tue, 9 Feb 2021 17:28:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58830 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234369AbhBIWX4 (ORCPT ); Tue, 9 Feb 2021 17:23:56 -0500 Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BDDD8C0401D9 for ; Tue, 9 Feb 2021 13:42:15 -0800 (PST) Received: by mail-wm1-x334.google.com with SMTP id u14so66858wmq.4 for ; Tue, 09 Feb 2021 13:42:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=la6gQl7erSD+nEyVnvBFQcLJJeu2/gq/KXt2BLbMiXM=; b=hQ6wojKsnC79pGnmJTSvV0/iA8V+JMx8fv7jGdPzA9a+7Yl6dJ+2lzeVeeVxmCo8Pc tThTHUK3cKbbQ2C/eMU609jPaPW8PcO5xaNzAlIZGNAsVQc6O6RdXq4AgD/ZbKHQ5W0P kahtQjQc8iMvfeen4n2mphyYrAjaIUnetGnVklZzXbkVrYRgb8jYDPyzUq5izMMfGot1 E+V5+8GYWJyr7QOPf1sObjfueve5PdnwLfjon9EOMMoAHgVCzJBDo+i9rhWbSqK8qJXy WUpDLQHHf587Pk7D1xPyTsRhTbszru7O/88pRdebR9n45S0fNCPGaC+JVdLZslez9Hco IyoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=la6gQl7erSD+nEyVnvBFQcLJJeu2/gq/KXt2BLbMiXM=; b=N8/90Ys8VTG2g7PV+kJHgWaH2mqdIeVMEfK/dw69QcCGLM3CDAiC5KZs2yXczeFzwz LWJFIyuZKH8GdhhFvZljvDg24T33PUgNhHbDVFBwgpTY3Um+eRjNRPpSufjSvqAQFvBV g9bYrJ83Puh9stDq2pBIHLjwZM9dcr1otNPx8xg8tW6eklG26kemcWnvobMpcTCZPFa1 gxCUseVrjZhgoBOuPMOQrIMLM4IqaSAFQUPe9s1/6828PwtO2D4MCUPcCcw2rXkhYby6 cCIPQ6fRsJGbnyYkQFevz+uuRSGgfcDQgm1msZewbGNuRZOW6ReSdPEgBihHQ68Tr9KN N2Wg== X-Gm-Message-State: AOAM53136eR9L6QUkhFX36YUyR95dY/a3+jYcUT2grMjeVOVsMY8oxEr HvzAViJICbFHYHdNcIVBBSSKGmwbxVsnXw== X-Google-Smtp-Source: ABdhPJwlqM4nVZbKQtuhv7HCnPafu591H5h0bPDba3+OBtnOMgzNOjESCRZ/1TAmdjSWXtw0BEwCsQ== X-Received: by 2002:a05:600c:3515:: with SMTP id h21mr79873wmq.179.1612906934201; Tue, 09 Feb 2021 13:42:14 -0800 (PST) Received: from vm.nix.is (vm.nix.is. [2a01:4f8:120:2468::2]) by smtp.gmail.com with ESMTPSA id m205sm38710wmf.40.2021.02.09.13.42.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Feb 2021 13:42:13 -0800 (PST) From: =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= To: git@vger.kernel.org Cc: Junio C Hamano , Johannes Schindelin , =?utf-8?q?SZEDER_G=C3=A1b?= =?utf-8?q?or?= , Jiang Xin , =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= Subject: [PATCH 02/12] test lib: change "error" to "BUG" as appropriate Date: Tue, 9 Feb 2021 22:41:49 +0100 Message-Id: <20210209214159.22815-3-avarab@gmail.com> X-Mailer: git-send-email 2.30.0.284.gd98b1dd5eaa7 In-Reply-To: <20210209214159.22815-1-avarab@gmail.com> References: <20210209214159.22815-1-avarab@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Change two uses of "error" in test-lib-functions.sh to "BUG". In the first instance in "test_cmp_rev" the author of the "BUG" function added in [1] had another in-flight patch adding this in [2], and the two were never consolidated. In the second case in "test_atexit" added in [3] that we could have instead used "BUG" appears to have been missed. 1. 165293af3ce (tests: send "bug in the test script" errors to the script's stderr, 2018-11-19) 2. 30d0b6dccbc (test-lib-functions: make 'test_cmp_rev' more informative on failure, 2018-11-19) 3. 900721e15c4 (test-lib: introduce 'test_atexit', 2019-03-13) Signed-off-by: Ævar Arnfjörð Bjarmason --- t/test-lib-functions.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/t/test-lib-functions.sh b/t/test-lib-functions.sh index 6bca0023168..0d40f8a598e 100644 --- a/t/test-lib-functions.sh +++ b/t/test-lib-functions.sh @@ -1105,7 +1105,7 @@ test_cmp_rev () { fi if test $# != 2 then - error "bug in the test script: test_cmp_rev requires two revisions, but got $#" + BUG "test_cmp_rev requires two revisions, but got $#" else local r1 r2 r1=$(git rev-parse --verify "$1") && @@ -1216,7 +1216,7 @@ test_atexit () { # doing so on Bash is better than nothing (the test will # silently pass on other shells). test "${BASH_SUBSHELL-0}" = 0 || - error "bug in test script: test_atexit does nothing in a subshell" + BUG "test_atexit does nothing in a subshell" test_atexit_cleanup="{ $* } && (exit \"\$eval_ret\"); eval_ret=\$?; $test_atexit_cleanup" } From patchwork Tue Feb 9 21:41:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= X-Patchwork-Id: 12079367 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C2BCEC43381 for ; Tue, 9 Feb 2021 22:59:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 911B064E40 for ; Tue, 9 Feb 2021 22:59:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234642AbhBIW6o (ORCPT ); Tue, 9 Feb 2021 17:58:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58870 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234319AbhBIWWd (ORCPT ); Tue, 9 Feb 2021 17:22:33 -0500 Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C0DB3C03C045 for ; Tue, 9 Feb 2021 13:42:16 -0800 (PST) Received: by mail-wm1-x32e.google.com with SMTP id i9so79039wmq.1 for ; Tue, 09 Feb 2021 13:42:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=63NYMlpFB88hApbscTOoL2kMlxFQErJFXFDT05KQW4s=; b=JjkDi76MSO2tUzZrpGSZelS5heiL4wKh7pS5efy3xxNcJDuUvSO3ZYN0a5JNNgBfFQ 9Fq2bg0zUDTL/OZDHsmQvpA8WWLjlpj9lVO+Zk6PekuYvNl5yH66JJfKrxJgjXQ/aDKd CcyFdSG7gFuMimESV3aWwX0Wppogb631KwdqjEvSZ/e7HBnWBeSWx4/hvNzRm8BmfAYd KYx/LzvpJnhztywFHhXRggCOL9AYj73zBbTpSyI2Ptx2NRVG8IX9aK93Vf7U/dg0KTmc 3ltz1joPqgcjmGp3s1tnNoqUiXDnC7JYtHUJNp5jLMbqKBChNvNr21H35xWHKQfT28M+ kJ/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=63NYMlpFB88hApbscTOoL2kMlxFQErJFXFDT05KQW4s=; b=GLJXWjqlOMV4SrqbbEL69OKav/p6h2M9ULhs2PMiN0dPy3L5qDtXq53E2Mx8h26f+c BePu2R0LAE+1ZsFF9sRMxT8KCR8uQEyPHmD1dVpwJkeLrEGE/cBY2vAIkltbTGFVbgsI Dqj0toM4yw/RUXAUqmhYtsQ2rnn7FBwEklGZ8HW9mnvf9i//1cLXkZt6kFtExCGfxI5a VtFpAWRUgGjsK2BrDlEZOTuLq6uqE9i4vjEykJILGLXIscJ4oYQlYiySEnGE6fhwUC+y JrOH8JgwyyEd00FDVvyuSaGCem44mnW843DDkgtyNVMUbe/tqMRe3Ffl/O0MV4fZFor3 oa+A== X-Gm-Message-State: AOAM530asVsiiqaJzleJStBcxjByT/tlyLSHyGWARR2xDd47xn0QNdNk /zg9F1q3F/aKFNkFMpCnWy2SvozLbaD7xg== X-Google-Smtp-Source: ABdhPJytrGJCTmtKIft6g9f4fpWO38kY2EFLUO9qp6BH+bw9iwVPjneDgTdsW3UdoctgniTZqtJzlg== X-Received: by 2002:a1c:67c4:: with SMTP id b187mr104585wmc.17.1612906935268; Tue, 09 Feb 2021 13:42:15 -0800 (PST) Received: from vm.nix.is (vm.nix.is. [2a01:4f8:120:2468::2]) by smtp.gmail.com with ESMTPSA id m205sm38710wmf.40.2021.02.09.13.42.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Feb 2021 13:42:14 -0800 (PST) From: =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= To: git@vger.kernel.org Cc: Junio C Hamano , Johannes Schindelin , =?utf-8?q?SZEDER_G=C3=A1b?= =?utf-8?q?or?= , Jiang Xin , =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= Subject: [PATCH 03/12] test-lib-functions: move test_set_index_version() to its user Date: Tue, 9 Feb 2021 22:41:50 +0100 Message-Id: <20210209214159.22815-4-avarab@gmail.com> X-Mailer: git-send-email 2.30.0.284.gd98b1dd5eaa7 In-Reply-To: <20210209214159.22815-1-avarab@gmail.com> References: <20210209214159.22815-1-avarab@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Move the test_set_index_version() function to its only user. This function has only been used in one place since its addition in 5d9fc888b48 (test-lib: allow setting the index format version, 2014-02-23). Let's have that test script define it. Signed-off-by: Ævar Arnfjörð Bjarmason --- t/t2104-update-index-skip-worktree.sh | 5 +++++ t/test-lib-functions.sh | 5 ----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/t/t2104-update-index-skip-worktree.sh b/t/t2104-update-index-skip-worktree.sh index 7e2e7dd4ae5..30666fc70d2 100755 --- a/t/t2104-update-index-skip-worktree.sh +++ b/t/t2104-update-index-skip-worktree.sh @@ -9,6 +9,11 @@ test_description='skip-worktree bit test' sane_unset GIT_TEST_SPLIT_INDEX +test_set_index_version () { + GIT_INDEX_VERSION="$1" + export GIT_INDEX_VERSION +} + test_set_index_version 3 cat >expect.full < X-Patchwork-Id: 12079369 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AA44BC433E9 for ; Tue, 9 Feb 2021 22:59:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 780B464E50 for ; Tue, 9 Feb 2021 22:59:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234622AbhBIW5v (ORCPT ); Tue, 9 Feb 2021 17:57:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58872 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234320AbhBIWWd (ORCPT ); Tue, 9 Feb 2021 17:22:33 -0500 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 C68E8C03C046 for ; Tue, 9 Feb 2021 13:42:17 -0800 (PST) Received: by mail-wr1-x429.google.com with SMTP id r21so7594655wrr.9 for ; Tue, 09 Feb 2021 13:42:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=C3Agq6r4sx3mvRV9qIKJhQu5ubUhR75fE8xNP1oMZ8o=; b=CiTX2y8cNdy2ulaEtGxqGt9otaY4Peg3JenvC+Ln0LhUPFvUrSE7DFIA6xvBESFy0+ cE0MCor5f5DeHXHxB4O+UTgVvnmalkI8EDgPYbFDxwl9Hiry9pKk7zNOA50i2IFOGM7G aBwsnb+jeq+AIUX0/gk8zbFefY0NvTgv+1jBV07JwIWw/Dw5Gei/45GckTDLkxMyNeGo yJjShTNkO5/JiEl3yIanCMPFp4rwX4euruw/wH8emxYRhbR1XI54ea/duwxZnFiYCn9E aeRrmaCcQVyPiv7pma0DA9trDUzXT6jeERLJK7LBcqaJjMyU0+/irKgBe0lHZRkJ2rOc ggsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=C3Agq6r4sx3mvRV9qIKJhQu5ubUhR75fE8xNP1oMZ8o=; b=s53iAQDJXQvQamoRdzxbK27NfGyWYaO3SrWo+1KmrA63dsszqWaWHxFRRWu+4eUGcJ EsQV6XPeLSJZveN/Nrxu+BEUCUpcMFUkCUuKS0MArUDxql7AQxMd8smOlXrQBvn+dm+0 R2j4Yy4ngkpa03noH/jrtyiUZB+88m+0c/GsOa+HGFoTZRr6Z/U+afb9zkifsbaV0WuR 3MTbg7cvjJM0tihRSJQXQtpWRqReFl4biGvOoqyxahZfT+j4vI8yoqNTmfBnkPcylo9M hVlTuB9YAoOomhr0MN6/v3Iz7gXw1p1UtQt7U3amFm3ehPilnpHr0Q7Cf7n2XECe4LrW Jg0Q== X-Gm-Message-State: AOAM5306xS/tneOEhGxj/LiRzKAYbZsmP3Da6nmFDkalewQtosvtbCSO 7U0mhWFyQbI5GGPGBUsNyX81b5E6UYZrdg== X-Google-Smtp-Source: ABdhPJxqyGPqlSFVRAYhWW7WU2JYzt+R5CQRaHbP+DruZiyii7stw6yKVdZtraFR8zl/Gd/dazznSg== X-Received: by 2002:a05:6000:1ca:: with SMTP id t10mr123312wrx.45.1612906936354; Tue, 09 Feb 2021 13:42:16 -0800 (PST) Received: from vm.nix.is (vm.nix.is. [2a01:4f8:120:2468::2]) by smtp.gmail.com with ESMTPSA id m205sm38710wmf.40.2021.02.09.13.42.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Feb 2021 13:42:15 -0800 (PST) From: =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= To: git@vger.kernel.org Cc: Junio C Hamano , Johannes Schindelin , =?utf-8?q?SZEDER_G=C3=A1b?= =?utf-8?q?or?= , Jiang Xin , =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= Subject: [PATCH 04/12] test-lib-functions: remove generate_zero_bytes() wrapper Date: Tue, 9 Feb 2021 22:41:51 +0100 Message-Id: <20210209214159.22815-5-avarab@gmail.com> X-Mailer: git-send-email 2.30.0.284.gd98b1dd5eaa7 In-Reply-To: <20210209214159.22815-1-avarab@gmail.com> References: <20210209214159.22815-1-avarab@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Since d5cfd142ec1 (tests: teach the test-tool to generate NUL bytes and use it, 2019-02-14) the generate_zero_bytes() functions has been a thin wrapper for "test-tool genzeros". Let's have its only user call that directly instead. Signed-off-by: Ævar Arnfjörð Bjarmason --- t/t5318-commit-graph.sh | 2 +- t/test-lib-functions.sh | 7 ------- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/t/t5318-commit-graph.sh b/t/t5318-commit-graph.sh index 2ed0c1544da..368d1cfb448 100755 --- a/t/t5318-commit-graph.sh +++ b/t/t5318-commit-graph.sh @@ -529,7 +529,7 @@ corrupt_graph_and_verify() { zero_pos=${4:-${orig_size}} && printf "$data" | dd of="$objdir/info/commit-graph" bs=1 seek="$pos" conv=notrunc && dd of="$objdir/info/commit-graph" bs=1 seek="$zero_pos" if=/dev/null && - generate_zero_bytes $(($orig_size - $zero_pos)) >>"$objdir/info/commit-graph" && + test-tool genzeros $(($orig_size - $zero_pos)) >>"$objdir/info/commit-graph" && corrupt_graph_verify "$grepstr" } diff --git a/t/test-lib-functions.sh b/t/test-lib-functions.sh index 728bdf94684..55d58b4a6ac 100644 --- a/t/test-lib-functions.sh +++ b/t/test-lib-functions.sh @@ -111,13 +111,6 @@ remove_cr () { tr '\015' Q | sed -e 's/Q$//' } -# Generate an output of $1 bytes of all zeroes (NULs, not ASCII zeroes). -# If $1 is 'infinity', output forever or until the receiving pipe stops reading, -# whichever comes first. -generate_zero_bytes () { - test-tool genzeros "$@" -} - # In some bourne shell implementations, the "unset" builtin returns # nonzero status when a variable to be unset was not set in the first # place. From patchwork Tue Feb 9 21:41:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= X-Patchwork-Id: 12079375 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3A1D1C433DB for ; Tue, 9 Feb 2021 23:03:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F391064E3C for ; Tue, 9 Feb 2021 23:03:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234162AbhBIXCK (ORCPT ); Tue, 9 Feb 2021 18:02:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59998 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234461AbhBIW1n (ORCPT ); Tue, 9 Feb 2021 17:27:43 -0500 Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C9BBAC03C048 for ; Tue, 9 Feb 2021 13:42:18 -0800 (PST) Received: by mail-wm1-x332.google.com with SMTP id m1so74212wml.2 for ; Tue, 09 Feb 2021 13:42:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=OxIDX2t9E6vAJFLQHjAWinm2/AuckMw/I/VnyOJ6sQg=; b=CFgQPxeOFYskZzyyA03pgeCKmmlENXShFd62igsZZOwoYt05eWsIRoc/ykuh+eD0dZ TGGEHoO9MmBin+YiMgvmttXBI5HBYPbDn6xolvSmAR5d72YnsLSLWXy42AcAbWcr9tUA LWvDa3tFr/fFS0DIzQKTOt9/3+mMLexKYNW8l771/SBIQDyMxTa3zJwwdDkLuCw635bZ dQED4CuHdpJDqf1FnN0B/0o5aH467IQgjv3p/xmpBburuTOiDCNK0NJ4f/Nm9mDevl+5 VdFW/qe5LD1w2sb2rqnFnjMYLU0ZPO3aKOHaatTC26z7s0+GK08uACRfyBBQBmj+DrMS 2tTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=OxIDX2t9E6vAJFLQHjAWinm2/AuckMw/I/VnyOJ6sQg=; b=az6D5B69kEeFEkSoHcywdjNy8diCyB6hSCtWmRX6A2EJ2j+dVXFo+NHqmsZg0Mjcs/ JDtbdSmAqkbqlV4X1t3Vvw9UYiOiqI7zzjQGuxhe+f0ACqwd2NZ5YMLWjGzntzaIRw+B jG4Dr/mubO4Cr4VQuzDl4K4E16QlPpl/xys4lQx13p7fEbrVj0Eb/dthqoFY6Tr+7qe6 pjY4KACbzycTlaA4PHOOmJNivnKfDtGHc7BCor9CvmdAeBZa0na+ZGFYltwz+gi3vPWB 8ReaLjv4meAD4EpYDa17mJm0qWLgBI7g+isrSyuIC712YBd1dtDHyHB5vp9h2YhqR6uw slcQ== X-Gm-Message-State: AOAM530uysGU5r9/wpJiSFePt0TwfbBpM/3ikoQ7wW04EZajhKYYB4rM RwCWe7xW3ChHdcfVxRaYUMbQeLMlKpTBQA== X-Google-Smtp-Source: ABdhPJykle5aEVrIQSDLU/foMLkoqm7eCpfjv0vaFLEFpcSThV9eRobZRhXLOf8moWfjDBioZbE8cQ== X-Received: by 2002:a1c:ab57:: with SMTP id u84mr93352wme.115.1612906937340; Tue, 09 Feb 2021 13:42:17 -0800 (PST) Received: from vm.nix.is (vm.nix.is. [2a01:4f8:120:2468::2]) by smtp.gmail.com with ESMTPSA id m205sm38710wmf.40.2021.02.09.13.42.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Feb 2021 13:42:16 -0800 (PST) From: =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= To: git@vger.kernel.org Cc: Junio C Hamano , Johannes Schindelin , =?utf-8?q?SZEDER_G=C3=A1b?= =?utf-8?q?or?= , Jiang Xin , =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= Subject: [PATCH 05/12] test libs: rename bundle helper to "lib-bundle.sh" Date: Tue, 9 Feb 2021 22:41:52 +0100 Message-Id: <20210209214159.22815-6-avarab@gmail.com> X-Mailer: git-send-email 2.30.0.284.gd98b1dd5eaa7 In-Reply-To: <20210209214159.22815-1-avarab@gmail.com> References: <20210209214159.22815-1-avarab@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Rename the recently introduced test-bundle-functions.sh to be consistent with other lib-*.sh files, which is the convention for these sorts of shared test library functions. The new test-bundle-functions.sh was introduced in 9901164d81d (test: add helper functions for git-bundle, 2021-01-11). It was the only test-*.sh of this nature. Signed-off-by: Ævar Arnfjörð Bjarmason --- t/{test-bundle-functions.sh => lib-bundle.sh} | 0 t/t5510-fetch.sh | 2 +- t/t6020-bundle-misc.sh | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) rename t/{test-bundle-functions.sh => lib-bundle.sh} (100%) diff --git a/t/test-bundle-functions.sh b/t/lib-bundle.sh similarity index 100% rename from t/test-bundle-functions.sh rename to t/lib-bundle.sh diff --git a/t/t5510-fetch.sh b/t/t5510-fetch.sh index 42f55030047..c1e0eb39231 100755 --- a/t/t5510-fetch.sh +++ b/t/t5510-fetch.sh @@ -9,7 +9,7 @@ GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME . ./test-lib.sh -. "$TEST_DIRECTORY"/test-bundle-functions.sh +. "$TEST_DIRECTORY"/lib-bundle.sh D=$(pwd) diff --git a/t/t6020-bundle-misc.sh b/t/t6020-bundle-misc.sh index 6249420a806..da5fe1ba6de 100755 --- a/t/t6020-bundle-misc.sh +++ b/t/t6020-bundle-misc.sh @@ -9,7 +9,7 @@ GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME . ./test-lib.sh -. "$TEST_DIRECTORY"/test-bundle-functions.sh +. "$TEST_DIRECTORY"/lib-bundle.sh # Create a commit or tag and set the variable with the object ID. test_commit_setvar () { From patchwork Tue Feb 9 21:41:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= X-Patchwork-Id: 12079379 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6631EC433DB for ; Tue, 9 Feb 2021 23:05:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 379DD64E3E for ; Tue, 9 Feb 2021 23:05:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234727AbhBIXDt (ORCPT ); Tue, 9 Feb 2021 18:03:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59938 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234444AbhBIW1n (ORCPT ); Tue, 9 Feb 2021 17:27:43 -0500 Received: from mail-wm1-x32b.google.com (mail-wm1-x32b.google.com [IPv6:2a00:1450:4864:20::32b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 030CBC03C04F for ; Tue, 9 Feb 2021 13:42:20 -0800 (PST) Received: by mail-wm1-x32b.google.com with SMTP id 190so77938wmz.0 for ; Tue, 09 Feb 2021 13:42:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=vCWOVVEp08Ewsyl41pBxSyLt+lkdxT3pzOJBWGlO9rg=; b=V9KUvxIZW0VAQc1VNO9gd3pVdTzj/NH1kfJZev9qtAPjGyvSwfxzHrJHF7fd3ZTJRe 1Gfbu5h36ojOs2cHhZFl7I6QkLo7NhXGwJU3rY5qLnFk2rK84okYJ/o+43nm/3SBdG0n 1IN9TE8RunPnhSwTVXoS2Yyw6qSxwja8pnIbQ6UQg1Q/ODoI8tInLxbHh7m295EqdfKJ YVskHzBVO4Ev0Dujwr3pooFnlZm5W2J0yLGinFW1KZog8wASFuaAlVz6tt7QljKxFEhe vll1A24Xrtg9cY23E+yC5GxrbYlpbY5OZBaf4qbBqk3Y2c5KrmVPZEAUvc3fIH683hlR 32sA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=vCWOVVEp08Ewsyl41pBxSyLt+lkdxT3pzOJBWGlO9rg=; b=BDQCTrWMtMi/p7xoMk3eRd44YhFwnRSYWSFFpA1FpFsfIstw8y8+E3YuUNivo3a5vQ 8egNCzLOZNmpL/RpLQRPwUs/BARj1ENXbTDmrwxWhKGY4QtcbssQxNQA9JTHFh0ef1FZ avBlchL5FYXf/mUR6U2oM2dmB3gNu/4BWR+jFnnSZ2y4ZoNHPpDMau6B8NSRjUS7FOis isWeNST8yXl+ZUBwgz4ZyNAXe9dA7IAt32ffy4NdOU2uidxMdQMHjLWZE9kVFiMGcmkA qL7jkhyuVRn9FPK/GLkG88R6ZfwxM8pn1fhbmdVaSZds4cT6m99a14jKOq+3le3ad6mS YBeA== X-Gm-Message-State: AOAM532/Tz7wRalyBDVFfD43//r5q2GwFChV53LU8nQyOMWLZE0ZWDjQ 8P9V2mLAyVyR/nlytOPYcyLHOM4eDsqT3g== X-Google-Smtp-Source: ABdhPJyDtF7Gc2TLdR7+zQTN2xlS64M8eTBua1FJLOTJP081plqGCmF1lmJNcL6RMv3Z/Nan9JHHGw== X-Received: by 2002:a1c:e90d:: with SMTP id q13mr111831wmc.136.1612906938489; Tue, 09 Feb 2021 13:42:18 -0800 (PST) Received: from vm.nix.is (vm.nix.is. [2a01:4f8:120:2468::2]) by smtp.gmail.com with ESMTPSA id m205sm38710wmf.40.2021.02.09.13.42.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Feb 2021 13:42:17 -0800 (PST) From: =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= To: git@vger.kernel.org Cc: Junio C Hamano , Johannes Schindelin , =?utf-8?q?SZEDER_G=C3=A1b?= =?utf-8?q?or?= , Jiang Xin , =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= Subject: [PATCH 06/12] test libs: rename gitweb-lib.sh to lib-gitweb.sh Date: Tue, 9 Feb 2021 22:41:53 +0100 Message-Id: <20210209214159.22815-7-avarab@gmail.com> X-Mailer: git-send-email 2.30.0.284.gd98b1dd5eaa7 In-Reply-To: <20210209214159.22815-1-avarab@gmail.com> References: <20210209214159.22815-1-avarab@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Rename gitweb-lib.sh to lib-gitweb.sh for consistency with other test library files. When it was introduced in 05526071cb5 (gitweb: split test suite into library and tests, 2009-08-27) this naming pattern was more common. Since then all but one other such library which didn't start with "lib-*.sh" such as t6000lib.sh has been been renamed, see e.g. 9d488eb40e2 (Move t6000lib.sh to lib-*, 2010-05-07). Signed-off-by: Ævar Arnfjörð Bjarmason --- t/{gitweb-lib.sh => lib-gitweb.sh} | 0 t/t9500-gitweb-standalone-no-errors.sh | 2 +- t/t9501-gitweb-standalone-http-status.sh | 2 +- t/t9502-gitweb-standalone-parse-output.sh | 2 +- 4 files changed, 3 insertions(+), 3 deletions(-) rename t/{gitweb-lib.sh => lib-gitweb.sh} (100%) diff --git a/t/gitweb-lib.sh b/t/lib-gitweb.sh similarity index 100% rename from t/gitweb-lib.sh rename to t/lib-gitweb.sh diff --git a/t/t9500-gitweb-standalone-no-errors.sh b/t/t9500-gitweb-standalone-no-errors.sh index ee8c6e30e67..0333065d4d6 100755 --- a/t/t9500-gitweb-standalone-no-errors.sh +++ b/t/t9500-gitweb-standalone-no-errors.sh @@ -13,7 +13,7 @@ or warnings to log.' GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME -. ./gitweb-lib.sh +. ./lib-gitweb.sh # ---------------------------------------------------------------------- # no commits (empty, just initialized repository) diff --git a/t/t9501-gitweb-standalone-http-status.sh b/t/t9501-gitweb-standalone-http-status.sh index 141610de546..32814e75df5 100755 --- a/t/t9501-gitweb-standalone-http-status.sh +++ b/t/t9501-gitweb-standalone-http-status.sh @@ -13,7 +13,7 @@ code and message.' GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME -. ./gitweb-lib.sh +. ./lib-gitweb.sh # # Gitweb only provides the functionality tested by the 'modification times' diff --git a/t/t9502-gitweb-standalone-parse-output.sh b/t/t9502-gitweb-standalone-parse-output.sh index 9cf7ab30a8d..3167473b303 100755 --- a/t/t9502-gitweb-standalone-parse-output.sh +++ b/t/t9502-gitweb-standalone-parse-output.sh @@ -13,7 +13,7 @@ in the HTTP header or the actual script output.' GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME -. ./gitweb-lib.sh +. ./lib-gitweb.sh # ---------------------------------------------------------------------- # snapshot file name and prefix From patchwork Tue Feb 9 21:41:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= X-Patchwork-Id: 12079387 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 82682C433E0 for ; Tue, 9 Feb 2021 23:10:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 46C0E64E53 for ; Tue, 9 Feb 2021 23:10:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234768AbhBIXIA (ORCPT ); Tue, 9 Feb 2021 18:08:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59938 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234518AbhBIWas (ORCPT ); Tue, 9 Feb 2021 17:30:48 -0500 Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F1B14C03C050 for ; Tue, 9 Feb 2021 13:42:20 -0800 (PST) Received: by mail-wr1-x433.google.com with SMTP id z6so23767158wrq.10 for ; Tue, 09 Feb 2021 13:42:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=vvzUi5LvKKiUtR6NZ9Pv0F+D2nk5vWxpoheMR1k8Atw=; b=q+mz+j3MVpxYWwVAi78mCWufjbMlXfx2S/OYyT5I6keXkwXRLRRRExsas8DRjhNHuL ack3O72eBp/P6IB0LzqXnOHVD9O3yi2aI4pZeYudKsW/u2Kdk7fhyVk+h4HBQtm78wtb leI0s/ANkvFoZPYaR0rhL01TizThjk4TJViPFUQyZN63EWm4GpG4Ph7HTpGE3dNMYTwd X+HJ1WxD8ez4myd1VBmFFnuzXGE0N4M2hHQ781g+PjcXwoN53vTPqO+6bh6mbt35gv5k gsDxP1Kq7kF4+/HUWMccIqLdpvIQE40S3oi2ffe74AaSwMHyVlTYbUKcgDQ8AOWqsu3I kCmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=vvzUi5LvKKiUtR6NZ9Pv0F+D2nk5vWxpoheMR1k8Atw=; b=rRi7L5LAN4M7AE+BQxhSr8xiEVZQ0bqhjLxqDYSEvao8K0s4ukiOciSPmZGLfpo+ld VfQbr6TT8mkLXcP+thPAiijS9XvV3Q0AI2fKQ6DSkSQGAN1ogECO2/EWPBAglmkjJq5J +sD7/YumXzLuRImTnDWCDKLbSGLrgp5ktt5atFM2Lmt87qnJrdqGy8rsS+dVuConsTx1 XXsLeMUE/jQo9fV3jV0uplJX4VPCsTCZTKw8Z91vKv66OqzsZexwwoGiEaMKQLFYhBan 5k4/CKF2eFZ5XxHeUpau7hGj/wnxZ93pFq4uDR6w+5SeYxp5bxJDY4doYK4IENeMIztu J+3A== X-Gm-Message-State: AOAM533Iybd3w1EYWDfxyGb7h9hFzAG5hh4rm83WaeRhY3HmvDZ1loqh M//NkUeE7gwm6qe/qtDXUtXL51MdZtUjAA== X-Google-Smtp-Source: ABdhPJwwmJjAwnSBw3U4KGYfW5TXXeVaQL9W6+H44fcU0p/q1QdhEpampi5/Z4cvlSGIvCQ8MQH06Q== X-Received: by 2002:a5d:4287:: with SMTP id k7mr101110wrq.317.1612906939446; Tue, 09 Feb 2021 13:42:19 -0800 (PST) Received: from vm.nix.is (vm.nix.is. [2a01:4f8:120:2468::2]) by smtp.gmail.com with ESMTPSA id m205sm38710wmf.40.2021.02.09.13.42.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Feb 2021 13:42:18 -0800 (PST) From: =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= To: git@vger.kernel.org Cc: Junio C Hamano , Johannes Schindelin , =?utf-8?q?SZEDER_G=C3=A1b?= =?utf-8?q?or?= , Jiang Xin , =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= Subject: [PATCH 07/12] test-lib-functions: move function to lib-bitmap.sh Date: Tue, 9 Feb 2021 22:41:54 +0100 Message-Id: <20210209214159.22815-8-avarab@gmail.com> X-Mailer: git-send-email 2.30.0.284.gd98b1dd5eaa7 In-Reply-To: <20210209214159.22815-1-avarab@gmail.com> References: <20210209214159.22815-1-avarab@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Move a function added to test-lib-functions.sh in ea047a8eb4f (t5310: factor out bitmap traversal comparison, 2020-02-14) into a new lib-bitmap.sh. The test-lib-functions.sh file should be for functions that are widely used across the test suite, if something's only used by a few tests it makes more sense to have it in a lib-*.sh file. Signed-off-by: Ævar Arnfjörð Bjarmason --- t/lib-bitmap.sh | 26 ++++++++++++++++++++++++++ t/t5310-pack-bitmaps.sh | 2 ++ t/t6113-rev-list-bitmap-filters.sh | 1 + t/test-lib-functions.sh | 27 --------------------------- 4 files changed, 29 insertions(+), 27 deletions(-) create mode 100644 t/lib-bitmap.sh diff --git a/t/lib-bitmap.sh b/t/lib-bitmap.sh new file mode 100644 index 00000000000..fe3f98be24f --- /dev/null +++ b/t/lib-bitmap.sh @@ -0,0 +1,26 @@ +# Compare a file containing rev-list bitmap traversal output to its non-bitmap +# counterpart. You can't just use test_cmp for this, because the two produce +# subtly different output: +# +# - regular output is in traversal order, whereas bitmap is split by type, +# with non-packed objects at the end +# +# - regular output has a space and the pathname appended to non-commit +# objects; bitmap output omits this +# +# This function normalizes and compares the two. The second file should +# always be the bitmap output. +test_bitmap_traversal () { + if test "$1" = "--no-confirm-bitmaps" + then + shift + elif cmp "$1" "$2" + then + echo >&2 "identical raw outputs; are you sure bitmaps were used?" + return 1 + fi && + cut -d' ' -f1 "$1" | sort >"$1.normalized" && + sort "$2" >"$2.normalized" && + test_cmp "$1.normalized" "$2.normalized" && + rm -f "$1.normalized" "$2.normalized" +} diff --git a/t/t5310-pack-bitmaps.sh b/t/t5310-pack-bitmaps.sh index 5ba76031090..40b9f632441 100755 --- a/t/t5310-pack-bitmaps.sh +++ b/t/t5310-pack-bitmaps.sh @@ -5,6 +5,8 @@ GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME . ./test-lib.sh +. "$TEST_DIRECTORY"/lib-bundle.sh +. "$TEST_DIRECTORY"/lib-bitmap.sh objpath () { echo ".git/objects/$(echo "$1" | sed -e 's|\(..\)|\1/|')" diff --git a/t/t6113-rev-list-bitmap-filters.sh b/t/t6113-rev-list-bitmap-filters.sh index 2b551e6fd0c..3f889949ca1 100755 --- a/t/t6113-rev-list-bitmap-filters.sh +++ b/t/t6113-rev-list-bitmap-filters.sh @@ -2,6 +2,7 @@ test_description='rev-list combining bitmaps and filters' . ./test-lib.sh +. "$TEST_DIRECTORY"/lib-bitmap.sh test_expect_success 'set up bitmapped repo' ' # one commit will have bitmaps, the other will not diff --git a/t/test-lib-functions.sh b/t/test-lib-functions.sh index 55d58b4a6ac..f228647c2b8 100644 --- a/t/test-lib-functions.sh +++ b/t/test-lib-functions.sh @@ -1602,33 +1602,6 @@ test_set_port () { eval $var=$port } -# Compare a file containing rev-list bitmap traversal output to its non-bitmap -# counterpart. You can't just use test_cmp for this, because the two produce -# subtly different output: -# -# - regular output is in traversal order, whereas bitmap is split by type, -# with non-packed objects at the end -# -# - regular output has a space and the pathname appended to non-commit -# objects; bitmap output omits this -# -# This function normalizes and compares the two. The second file should -# always be the bitmap output. -test_bitmap_traversal () { - if test "$1" = "--no-confirm-bitmaps" - then - shift - elif cmp "$1" "$2" - then - echo >&2 "identical raw outputs; are you sure bitmaps were used?" - return 1 - fi && - cut -d' ' -f1 "$1" | sort >"$1.normalized" && - sort "$2" >"$2.normalized" && - test_cmp "$1.normalized" "$2.normalized" && - rm -f "$1.normalized" "$2.normalized" -} - # Tests for the hidden file attribute on Windows test_path_is_hidden () { test_have_prereq MINGW || From patchwork Tue Feb 9 21:41:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= X-Patchwork-Id: 12079385 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5314FC433E0 for ; Tue, 9 Feb 2021 23:10:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0786864E54 for ; Tue, 9 Feb 2021 23:10:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234751AbhBIXHM (ORCPT ); Tue, 9 Feb 2021 18:07:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59784 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234485AbhBIW2Z (ORCPT ); Tue, 9 Feb 2021 17:28:25 -0500 Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3C5E7C03C060 for ; Tue, 9 Feb 2021 13:42:22 -0800 (PST) Received: by mail-wr1-x431.google.com with SMTP id u14so23876213wri.3 for ; Tue, 09 Feb 2021 13:42:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=eTUrbus+7fU6b/FgX/xfOphNnsBKjv+9IP91do+BagU=; b=JGPrMyvF3r6tN92d3+m6aEHPjr4wZ1hkKiZDpmN/PxLoDg8Fyr43aNJ9O6af30h3Vb jCjL10psgftOIVNpu8VdK2BhzvfPJRmrEjT6NO0eBWjBMt/DTUEO54jLtZiJoVdjPHFn TUOAUR6HC/DRNUb6CQwwL+SlOmvcLdD8FQV4iH38l/ashBi/sblxKlAH8QUDx86eeH6A q7zcmYGsa3fU4zGg6XzVBte2Ta25Y9UngLJV2jN80gGuxnFhSAQFnIFMfN9ORjdD88+w z1DEpOQPDnYorFgDQOwxABggBe/tj4wZaN5qZuV0r2uMZ3nDYjDmsMVZQ7KP5/mSfAOt nLmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=eTUrbus+7fU6b/FgX/xfOphNnsBKjv+9IP91do+BagU=; b=C+vT5CjtMMSIah9rvur35YbWP9bTz0k/pswJI+uGuEI8tTvoqBVu3kStAVN6xmO5SO 84L/QyntiZgMM1rEl1CWEVuI96wnudc1SDoCP6kCUXBPzEinATb8RjCf578U2aDxiEIp i4UQhI6CujOVS+ulFfe44Vr0jWe1Mn2ueq7uUMkO75IAfqWloKQXYKEy0+xwnLVPoOqf aRhrnbeA7c/mlUAaaAoIc66dVfHC6qUXz3+mDhCypSQgdGz+ts8QBAtXbe0Knvydw4B4 rU660N4Nw3eoPL1s3A1+EMjiotYM3FOoYpWbmc3mGoD5q0BlU3sGVWGuRMR1YwYQt1Bv 6J1A== X-Gm-Message-State: AOAM532H+IqVV3j/LUt0+kBfnKUjvY6Ehn1S4mHKth13BErvwfF35LVF AUiNYIa9YwKCwXI90mqVdstmCbmVGIp72Q== X-Google-Smtp-Source: ABdhPJwdtul70ClBGEit1QA/Qg9XzNbkzcvCnCy9VZDY2c12z2Zuxi5N6K2RqlW0BtgtLTXSqMYC/Q== X-Received: by 2002:a5d:6181:: with SMTP id j1mr120564wru.11.1612906940663; Tue, 09 Feb 2021 13:42:20 -0800 (PST) Received: from vm.nix.is (vm.nix.is. [2a01:4f8:120:2468::2]) by smtp.gmail.com with ESMTPSA id m205sm38710wmf.40.2021.02.09.13.42.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Feb 2021 13:42:19 -0800 (PST) From: =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= To: git@vger.kernel.org Cc: Junio C Hamano , Johannes Schindelin , =?utf-8?q?SZEDER_G=C3=A1b?= =?utf-8?q?or?= , Jiang Xin , =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= Subject: [PATCH 08/12] t/.gitattributes: sort lines Date: Tue, 9 Feb 2021 22:41:55 +0100 Message-Id: <20210209214159.22815-9-avarab@gmail.com> X-Mailer: git-send-email 2.30.0.284.gd98b1dd5eaa7 In-Reply-To: <20210209214159.22815-1-avarab@gmail.com> References: <20210209214159.22815-1-avarab@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Sort the lines starting with "/", the only out-of-place line was added along with most of the file in 614f4f0f350 (Fix the remaining tests that failed with core.autocrlf=true, 2017-05-09). Signed-off-by: Ævar Arnfjörð Bjarmason --- t/.gitattributes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/.gitattributes b/t/.gitattributes index df05434d32c..d778bfad052 100644 --- a/t/.gitattributes +++ b/t/.gitattributes @@ -5,9 +5,9 @@ t[0-9][0-9][0-9][0-9]/* -whitespace /t3206/* eol=lf /t3900/*.txt eol=lf /t3901/*.txt eol=lf -/t4034/*/* eol=lf /t4013/* eol=lf /t4018/* eol=lf +/t4034/*/* eol=lf /t4051/* eol=lf /t4100/* eol=lf /t4101/* eol=lf From patchwork Tue Feb 9 21:41:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= X-Patchwork-Id: 12079381 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B427DC433E6 for ; Tue, 9 Feb 2021 23:05:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8F17064E3C for ; Tue, 9 Feb 2021 23:05:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234527AbhBIXFG (ORCPT ); Tue, 9 Feb 2021 18:05:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59934 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234374AbhBIW1n (ORCPT ); Tue, 9 Feb 2021 17:27:43 -0500 Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 82642C03C061 for ; Tue, 9 Feb 2021 13:42:23 -0800 (PST) Received: by mail-wr1-x434.google.com with SMTP id u14so23876267wri.3 for ; Tue, 09 Feb 2021 13:42:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=TtesTwN93tyf2I5dt0gutc3jNuikJX+ZjhkN9JAcqVs=; b=fN+9UTXxs85kTN9pHnJBw1xlZ9K6T2K1RBLUB0SLWokcXBZ3oUfKJL2tNg2M9AZs6m wTB14E0kIJFAgCa8gueIzoliMKDTIslHBPTlsFomPZ5AMfs1xEkzmHf+3047Q5DqlQ47 TWsmc3DcJinFTn20CMbbBQ9d1WPgtb0BesZW3c08WkpkC/Hgz+rJ5n9C1MGnqy8isQfQ uK0AtIYI28dqYghtrapbShwXEWCriIV0PtSvNfwmvm4KoaTw6nMZ9HlLUqzKIZgLVeT4 8z6g2MLY1QV/zG/hpOOLxpJJUMpDEPkGxArCclCd1ZIlnWPX4DFloRGxjfeE9jL9bCI2 dbPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=TtesTwN93tyf2I5dt0gutc3jNuikJX+ZjhkN9JAcqVs=; b=cOdLEMOL53r5OTeYP8DIgxiamAWhD0mFspo/P/pMahc4wnxRcToF3arh9juyxQ+6wv /CvjHFBnf9BMX5tWVq/osQz7wWjcwUxDRCY5/7MzQKDEhS5GD1ssd3skRxXKRDg2GMQ7 wBoXDUXhRFJaNh0WIAVjRBrpKNfAX1xPJ2hD3CiwddPOfQy7TWUeYLvPJJNRn5k847+k Ljz+XpG//AV3B8a88BSv31aZy4ruMfvYcjEcoXf1Lsx+0OphpAJ9sl6UpAVMsvVLvK4m 3r4PtUQgbZdIDbsVWs3sB1BQAutqojo0/bDO7Kz8DfLbGWpzi2UZZUx6wGEVzJO+LOLz LLFw== X-Gm-Message-State: AOAM531KX11eOiZTyjkyCpFXDjhVHTpnNXq88jCyrDDN7Drlz28euhiI cBkwxmPs0Z6Fgu6ZpIz8iVNqJI/32bns4A== X-Google-Smtp-Source: ABdhPJyZXr/61MTTQKpr2YfXmK9YymhxpLvIG2Ildwvy5r04oLUdr5KqA+IALE5Z3PFRGe+WspJVVQ== X-Received: by 2002:a05:6000:143:: with SMTP id r3mr97225wrx.357.1612906941608; Tue, 09 Feb 2021 13:42:21 -0800 (PST) Received: from vm.nix.is (vm.nix.is. [2a01:4f8:120:2468::2]) by smtp.gmail.com with ESMTPSA id m205sm38710wmf.40.2021.02.09.13.42.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Feb 2021 13:42:20 -0800 (PST) From: =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= To: git@vger.kernel.org Cc: Junio C Hamano , Johannes Schindelin , =?utf-8?q?SZEDER_G=C3=A1b?= =?utf-8?q?or?= , Jiang Xin , =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= Subject: [PATCH 09/12] test libs: rename "diff-lib" to "lib-diff" Date: Tue, 9 Feb 2021 22:41:56 +0100 Message-Id: <20210209214159.22815-10-avarab@gmail.com> X-Mailer: git-send-email 2.30.0.284.gd98b1dd5eaa7 In-Reply-To: <20210209214159.22815-1-avarab@gmail.com> References: <20210209214159.22815-1-avarab@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Rename the "diff-lib" to "lib-diff". With this rename and preceding commits there is no remaining t/*lib* which doesn't follow the convention of being called t/lib-*. --- t/.gitattributes | 2 +- t/{diff-lib.sh => lib-diff.sh} | 0 t/{diff-lib => lib-diff}/COPYING | 0 t/{diff-lib => lib-diff}/README | 0 t/t4000-diff-format.sh | 2 +- t/t4001-diff-rename.sh | 2 +- t/t4003-diff-rename-1.sh | 6 +++--- t/t4004-diff-rename-symlink.sh | 2 +- t/t4005-diff-rename-2.sh | 6 +++--- t/t4007-rename-3.sh | 6 +++--- t/t4008-diff-break-rewrite.sh | 6 +++--- t/t4009-diff-rename-4.sh | 6 +++--- t/t4010-diff-pathspec.sh | 2 +- t/t4011-diff-symlink.sh | 2 +- t/t4013-diff-various.sh | 2 +- t/t4015-diff-whitespace.sh | 2 +- t/t4027-diff-submodule.sh | 2 +- t/t4034-diff-words.sh | 2 +- t/t4038-diff-combined.sh | 2 +- t/t4061-diff-indent.sh | 2 +- t/t4206-log-follow-harder-copies.sh | 2 +- t/t7501-commit-basic-functionality.sh | 2 +- t/t9300-fast-import.sh | 2 +- 23 files changed, 30 insertions(+), 30 deletions(-) rename t/{diff-lib.sh => lib-diff.sh} (100%) rename t/{diff-lib => lib-diff}/COPYING (100%) rename t/{diff-lib => lib-diff}/README (100%) diff --git a/t/.gitattributes b/t/.gitattributes index d778bfad052..dafa17c3e61 100644 --- a/t/.gitattributes +++ b/t/.gitattributes @@ -1,6 +1,6 @@ t[0-9][0-9][0-9][0-9]/* -whitespace /chainlint/*.expect eol=lf -/diff-lib/* eol=lf +/lib-diff/* eol=lf /t0110/url-* binary /t3206/* eol=lf /t3900/*.txt eol=lf diff --git a/t/diff-lib.sh b/t/lib-diff.sh similarity index 100% rename from t/diff-lib.sh rename to t/lib-diff.sh diff --git a/t/diff-lib/COPYING b/t/lib-diff/COPYING similarity index 100% rename from t/diff-lib/COPYING rename to t/lib-diff/COPYING diff --git a/t/diff-lib/README b/t/lib-diff/README similarity index 100% rename from t/diff-lib/README rename to t/lib-diff/README diff --git a/t/t4000-diff-format.sh b/t/t4000-diff-format.sh index e5116a76a1c..cce334981e1 100755 --- a/t/t4000-diff-format.sh +++ b/t/t4000-diff-format.sh @@ -7,7 +7,7 @@ test_description='Test built-in diff output engine. ' . ./test-lib.sh -. "$TEST_DIRECTORY"/diff-lib.sh +. "$TEST_DIRECTORY"/lib-diff.sh echo >path0 'Line 1 Line 2 diff --git a/t/t4001-diff-rename.sh b/t/t4001-diff-rename.sh index c16486a9d41..2f9700742aa 100755 --- a/t/t4001-diff-rename.sh +++ b/t/t4001-diff-rename.sh @@ -7,7 +7,7 @@ test_description='Test rename detection in diff engine. ' . ./test-lib.sh -. "$TEST_DIRECTORY"/diff-lib.sh +. "$TEST_DIRECTORY"/lib-diff.sh test_expect_success 'setup' ' cat >path0 <<-\EOF && diff --git a/t/t4003-diff-rename-1.sh b/t/t4003-diff-rename-1.sh index df2accb6555..db07ff3eb19 100755 --- a/t/t4003-diff-rename-1.sh +++ b/t/t4003-diff-rename-1.sh @@ -7,11 +7,11 @@ test_description='More rename detection ' . ./test-lib.sh -. "$TEST_DIRECTORY"/diff-lib.sh ;# test-lib chdir's into trash +. "$TEST_DIRECTORY"/lib-diff.sh ;# test-lib chdir's into trash test_expect_success \ 'prepare reference tree' \ - 'cat "$TEST_DIRECTORY"/diff-lib/COPYING >COPYING && + 'cat "$TEST_DIRECTORY"/lib-diff/COPYING >COPYING && echo frotz >rezrov && git update-index --add COPYING rezrov && tree=$(git write-tree) && @@ -99,7 +99,7 @@ test_expect_success \ test_expect_success \ 'prepare work tree once again' \ - 'cat "$TEST_DIRECTORY"/diff-lib/COPYING >COPYING && + 'cat "$TEST_DIRECTORY"/lib-diff/COPYING >COPYING && git update-index --add --remove COPYING COPYING.1' # tree has COPYING and rezrov. work tree has COPYING and COPYING.1, diff --git a/t/t4004-diff-rename-symlink.sh b/t/t4004-diff-rename-symlink.sh index 6e562c80d12..3d495e37bb1 100755 --- a/t/t4004-diff-rename-symlink.sh +++ b/t/t4004-diff-rename-symlink.sh @@ -10,7 +10,7 @@ copy of symbolic links, but should not produce rename/copy followed by an edit for them. ' . ./test-lib.sh -. "$TEST_DIRECTORY"/diff-lib.sh +. "$TEST_DIRECTORY"/lib-diff.sh test_expect_success SYMLINKS \ 'prepare reference tree' \ diff --git a/t/t4005-diff-rename-2.sh b/t/t4005-diff-rename-2.sh index d18a80493c2..86479061325 100755 --- a/t/t4005-diff-rename-2.sh +++ b/t/t4005-diff-rename-2.sh @@ -6,10 +6,10 @@ test_description='Same rename detection as t4003 but testing diff-raw.' . ./test-lib.sh -. "$TEST_DIRECTORY"/diff-lib.sh ;# test-lib chdir's into trash +. "$TEST_DIRECTORY"/lib-diff.sh ;# test-lib chdir's into trash test_expect_success 'setup reference tree' ' - cat "$TEST_DIRECTORY"/diff-lib/COPYING >COPYING && + cat "$TEST_DIRECTORY"/lib-diff/COPYING >COPYING && echo frotz >rezrov && git update-index --add COPYING rezrov && tree=$(git write-tree) && @@ -64,7 +64,7 @@ test_expect_success 'validate output from rename/copy detection (#2)' ' # nows how to say Copy. test_expect_success 'validate output from rename/copy detection (#3)' ' - cat "$TEST_DIRECTORY"/diff-lib/COPYING >COPYING && + cat "$TEST_DIRECTORY"/lib-diff/COPYING >COPYING && git update-index --add --remove COPYING COPYING.1 && cat <<-EOF >expected && diff --git a/t/t4007-rename-3.sh b/t/t4007-rename-3.sh index b187b7f6c66..cbb9c62f535 100755 --- a/t/t4007-rename-3.sh +++ b/t/t4007-rename-3.sh @@ -7,17 +7,17 @@ test_description='Rename interaction with pathspec. ' . ./test-lib.sh -. "$TEST_DIRECTORY"/diff-lib.sh ;# test-lib chdir's into trash +. "$TEST_DIRECTORY"/lib-diff.sh ;# test-lib chdir's into trash test_expect_success 'prepare reference tree' ' mkdir path0 path1 && - cp "$TEST_DIRECTORY"/diff-lib/COPYING path0/COPYING && + cp "$TEST_DIRECTORY"/lib-diff/COPYING path0/COPYING && git update-index --add path0/COPYING && tree=$(git write-tree) && echo $tree ' -blob=$(git hash-object "$TEST_DIRECTORY/diff-lib/COPYING") +blob=$(git hash-object "$TEST_DIRECTORY/lib-diff/COPYING") test_expect_success 'prepare work tree' ' cp path0/COPYING path1/COPYING && git update-index --add --remove path0/COPYING path1/COPYING diff --git a/t/t4008-diff-break-rewrite.sh b/t/t4008-diff-break-rewrite.sh index b1ccd4102e0..2299f27511b 100755 --- a/t/t4008-diff-break-rewrite.sh +++ b/t/t4008-diff-break-rewrite.sh @@ -22,11 +22,11 @@ With -B, this should be detected as two complete rewrites. Further, with -B and -M together, these should turn into two renames. ' . ./test-lib.sh -. "$TEST_DIRECTORY"/diff-lib.sh ;# test-lib chdir's into trash +. "$TEST_DIRECTORY"/lib-diff.sh ;# test-lib chdir's into trash test_expect_success setup ' - cat "$TEST_DIRECTORY"/diff-lib/README >file0 && - cat "$TEST_DIRECTORY"/diff-lib/COPYING >file1 && + cat "$TEST_DIRECTORY"/lib-diff/README >file0 && + cat "$TEST_DIRECTORY"/lib-diff/COPYING >file1 && blob0_id=$(git hash-object file0) && blob1_id=$(git hash-object file1) && git update-index --add file0 file1 && diff --git a/t/t4009-diff-rename-4.sh b/t/t4009-diff-rename-4.sh index b63bdf031f5..b1da807f169 100755 --- a/t/t4009-diff-rename-4.sh +++ b/t/t4009-diff-rename-4.sh @@ -7,11 +7,11 @@ test_description='Same rename detection as t4003 but testing diff-raw -z. ' . ./test-lib.sh -. "$TEST_DIRECTORY"/diff-lib.sh ;# test-lib chdir's into trash +. "$TEST_DIRECTORY"/lib-diff.sh ;# test-lib chdir's into trash test_expect_success \ 'prepare reference tree' \ - 'cat "$TEST_DIRECTORY"/diff-lib/COPYING >COPYING && + 'cat "$TEST_DIRECTORY"/lib-diff/COPYING >COPYING && echo frotz >rezrov && git update-index --add COPYING rezrov && orig=$(git hash-object COPYING) && @@ -81,7 +81,7 @@ test_expect_success \ test_expect_success \ 'prepare work tree once again' \ - 'cat "$TEST_DIRECTORY"/diff-lib/COPYING >COPYING && + 'cat "$TEST_DIRECTORY"/lib-diff/COPYING >COPYING && git update-index --add --remove COPYING COPYING.1' git diff-index -z -C --find-copies-harder $tree >current diff --git a/t/t4010-diff-pathspec.sh b/t/t4010-diff-pathspec.sh index 65cc703c659..1bbced79ece 100755 --- a/t/t4010-diff-pathspec.sh +++ b/t/t4010-diff-pathspec.sh @@ -10,7 +10,7 @@ Prepare: path1/file1 ' . ./test-lib.sh -. "$TEST_DIRECTORY"/diff-lib.sh ;# test-lib chdir's into trash +. "$TEST_DIRECTORY"/lib-diff.sh ;# test-lib chdir's into trash test_expect_success \ setup \ diff --git a/t/t4011-diff-symlink.sh b/t/t4011-diff-symlink.sh index 717034bb50b..5a25c259fe3 100755 --- a/t/t4011-diff-symlink.sh +++ b/t/t4011-diff-symlink.sh @@ -7,7 +7,7 @@ test_description='Test diff of symlinks. ' . ./test-lib.sh -. "$TEST_DIRECTORY"/diff-lib.sh +. "$TEST_DIRECTORY"/lib-diff.sh # Print the short OID of a symlink with the given name. symlink_oid () { diff --git a/t/t4013-diff-various.sh b/t/t4013-diff-various.sh index ce6aa3914fe..fcc30d8cc26 100755 --- a/t/t4013-diff-various.sh +++ b/t/t4013-diff-various.sh @@ -9,7 +9,7 @@ GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME . ./test-lib.sh -. "$TEST_DIRECTORY"/diff-lib.sh +. "$TEST_DIRECTORY"/lib-diff.sh test_expect_success setup ' diff --git a/t/t4015-diff-whitespace.sh b/t/t4015-diff-whitespace.sh index 8c574221b27..2c13b62d3c6 100755 --- a/t/t4015-diff-whitespace.sh +++ b/t/t4015-diff-whitespace.sh @@ -7,7 +7,7 @@ test_description='Test special whitespace in diff engine. ' . ./test-lib.sh -. "$TEST_DIRECTORY"/diff-lib.sh +. "$TEST_DIRECTORY"/lib-diff.sh test_expect_success "Ray Lehtiniemi's example" ' cat <<-\EOF >x && diff --git a/t/t4027-diff-submodule.sh b/t/t4027-diff-submodule.sh index 894a11b224d..94ef77e1dfe 100755 --- a/t/t4027-diff-submodule.sh +++ b/t/t4027-diff-submodule.sh @@ -3,7 +3,7 @@ test_description='difference in submodules' . ./test-lib.sh -. "$TEST_DIRECTORY"/diff-lib.sh +. "$TEST_DIRECTORY"/lib-diff.sh test_expect_success setup ' test_tick && diff --git a/t/t4034-diff-words.sh b/t/t4034-diff-words.sh index 0c8fb39ceda..56f1e62a97b 100755 --- a/t/t4034-diff-words.sh +++ b/t/t4034-diff-words.sh @@ -3,7 +3,7 @@ test_description='word diff colors' . ./test-lib.sh -. "$TEST_DIRECTORY"/diff-lib.sh +. "$TEST_DIRECTORY"/lib-diff.sh cat >pre.simple <<-\EOF h(4) diff --git a/t/t4038-diff-combined.sh b/t/t4038-diff-combined.sh index 09ad491a593..aeac203c424 100755 --- a/t/t4038-diff-combined.sh +++ b/t/t4038-diff-combined.sh @@ -6,7 +6,7 @@ GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME . ./test-lib.sh -. "$TEST_DIRECTORY"/diff-lib.sh +. "$TEST_DIRECTORY"/lib-diff.sh setup_helper () { one=$1 branch=$2 side=$3 && diff --git a/t/t4061-diff-indent.sh b/t/t4061-diff-indent.sh index bcf7493740a..7750b87ca16 100755 --- a/t/t4061-diff-indent.sh +++ b/t/t4061-diff-indent.sh @@ -7,7 +7,7 @@ GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME . ./test-lib.sh -. "$TEST_DIRECTORY"/diff-lib.sh +. "$TEST_DIRECTORY"/lib-diff.sh # Compare two diff outputs. Ignore "index" lines, because we don't # care about SHA-1s or file modes. diff --git a/t/t4206-log-follow-harder-copies.sh b/t/t4206-log-follow-harder-copies.sh index ad29e65fcba..4871a5dc92f 100755 --- a/t/t4206-log-follow-harder-copies.sh +++ b/t/t4206-log-follow-harder-copies.sh @@ -7,7 +7,7 @@ test_description='Test --follow should always find copies hard in git log. ' . ./test-lib.sh -. "$TEST_DIRECTORY"/diff-lib.sh +. "$TEST_DIRECTORY"/lib-diff.sh echo >path0 'Line 1 Line 2 diff --git a/t/t7501-commit-basic-functionality.sh b/t/t7501-commit-basic-functionality.sh index 0f936182e4f..512ae2781fe 100755 --- a/t/t7501-commit-basic-functionality.sh +++ b/t/t7501-commit-basic-functionality.sh @@ -11,7 +11,7 @@ GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME . ./test-lib.sh -. "$TEST_DIRECTORY/diff-lib.sh" +. "$TEST_DIRECTORY/lib-diff.sh" author='The Real Author ' diff --git a/t/t9300-fast-import.sh b/t/t9300-fast-import.sh index 3d17e932a0e..3d77701fd4d 100755 --- a/t/t9300-fast-import.sh +++ b/t/t9300-fast-import.sh @@ -8,7 +8,7 @@ GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME . ./test-lib.sh -. "$TEST_DIRECTORY"/diff-lib.sh ;# test-lib chdir's into trash +. "$TEST_DIRECTORY"/lib-diff.sh ;# test-lib chdir's into trash verify_packs () { for p in .git/objects/pack/*.pack From patchwork Tue Feb 9 21:41:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= X-Patchwork-Id: 12079377 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A6D71C4332E for ; Tue, 9 Feb 2021 23:03:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 871CF64E37 for ; Tue, 9 Feb 2021 23:03:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234704AbhBIXDU (ORCPT ); Tue, 9 Feb 2021 18:03:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60068 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234465AbhBIW1n (ORCPT ); Tue, 9 Feb 2021 17:27:43 -0500 Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4E835C03C062 for ; Tue, 9 Feb 2021 13:42:24 -0800 (PST) Received: by mail-wm1-x332.google.com with SMTP id j11so65368wmi.3 for ; Tue, 09 Feb 2021 13:42:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=UTKudURib+5+3s5FQCLyoTTs8z4yPlQ/VkQDoowPddA=; b=IH9W90HhOKS5UQnsVsRXrzusepWAe7xwT7gUdJ+2zgTMirus6s1B+MVQkPtTwGrIvF +SyxFox2PctdeSbKdD5brjUtAlxSDFKGXy/PUKX8JvmscIkF7dAmo38cRflU6/kGubAc hgmQ3kTDJnPH2fVWSzxnk25W/Gic/3wxohptEp9KoChn32XpzqfxgjK6sx/4+4w+1Wvh ERTxPOXBzDAC2XBpyalOaW1L8lIHEcaEbLfuGB2NlcIi6zls/i3lm2NJ9n5ws2DRScb3 PmMZbhMeiIVfssSBKPRTxKuLwY1lEfwQBO9vCxUYNqBqFKb3trbUbAr1fFngCA5tEjCc p6fA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=UTKudURib+5+3s5FQCLyoTTs8z4yPlQ/VkQDoowPddA=; b=ZPQuEcIeyNnG/NzgxizH5Av8dh03eI94ywZufFoLiEsp4oQqFopusiu3PGWiDmriWH c5W1zg+LRP8yHVDnBpL7XpvG8Uu+GmJV+GTbhPB0U9zWFUxR2tjAZKVUN9SnJ+0330xc PtZzvl+UlD+guwSPLiyMizsjoRNacuqUNRyNwdvshQOEuw7Drv5wcYYy8+698igiWM8z tW2eX/u6nXdDrC7IbzoV1KkNcJf+0JJb6ClrojMTeBHm2Ql5QzoD0j9/78XeQqFQhuzG fG2qvUp5Sud5OROjGBHHPIAKGmFzdP/RxGNijjVqMSLkjEQiLGoQqQP6C32T/MTeC07V Ze2A== X-Gm-Message-State: AOAM5316OKpRht9AEz4/sLc4lN3In3WIUdzbIqye4bBXyTwt5kFJYcDo hQLa+1Q0y8ctyCnZmBNJ0k58GdxAfFzUTg== X-Google-Smtp-Source: ABdhPJzkhNBr+yvdmzX3fKRuqvvIEhfB/qJ0M6SC1MHK6TzU5U97zOwb8YUujPoRM82Hun7aDtVpJg== X-Received: by 2002:a05:600c:4e92:: with SMTP id f18mr112313wmq.126.1612906942709; Tue, 09 Feb 2021 13:42:22 -0800 (PST) Received: from vm.nix.is (vm.nix.is. [2a01:4f8:120:2468::2]) by smtp.gmail.com with ESMTPSA id m205sm38710wmf.40.2021.02.09.13.42.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Feb 2021 13:42:21 -0800 (PST) From: =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= To: git@vger.kernel.org Cc: Junio C Hamano , Johannes Schindelin , =?utf-8?q?SZEDER_G=C3=A1b?= =?utf-8?q?or?= , Jiang Xin , =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= Subject: [PATCH 10/12] test-lib-functions: remove bug-inducing "diagnostics" helper param Date: Tue, 9 Feb 2021 22:41:57 +0100 Message-Id: <20210209214159.22815-11-avarab@gmail.com> X-Mailer: git-send-email 2.30.0.284.gd98b1dd5eaa7 In-Reply-To: <20210209214159.22815-1-avarab@gmail.com> References: <20210209214159.22815-1-avarab@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Remove the optional "diagnostics" parameter of the test_path_is_{file,dir,missing} functions. We have a lot of uses of these functions, but the only legitimate use of the diagnostics parameter is from when the functions themselves were introduced in 2caf20c52b7 (test-lib: user-friendly alternatives to test [-d|-f|-e], 2010-08-10). But as the the rest of this diff demonstrates its presence did more to silently introduce bugs in our tests. Fix such bugs in the tests added in ae4e89e549b (gc: add --keep-largest-pack option, 2018-04-15), and c04ba51739a (t6046: testcases checking whether updates can be skipped in a merge, 2018-04-19). Let's also assert that those functions are called with exactly one parameter, a follow-up commit will add similar asserts to other functions in test-lib-functions.sh that we didn't have existing misuse of. Signed-off-by: Ævar Arnfjörð Bjarmason --- t/README | 8 ++++---- t/t3404-rebase-interactive.sh | 3 ++- t/t6426-merge-skip-unneeded-updates.sh | 16 ++++++++++++---- t/t6500-gc.sh | 4 ++-- t/test-lib-functions.sh | 11 ++++++----- 5 files changed, 26 insertions(+), 16 deletions(-) diff --git a/t/README b/t/README index c730a707705..df38d8d6be3 100644 --- a/t/README +++ b/t/README @@ -917,13 +917,13 @@ library for your script to use. Check whether a file has the length it is expected to. - - test_path_is_file [] - test_path_is_dir [] - test_path_is_missing [] + - test_path_is_file + test_path_is_dir + test_path_is_missing Check if the named path is a file, if the named path is a directory, or if the named path does not exist, respectively, - and fail otherwise, showing the text. + and fail otherwise. - test_when_finished