From patchwork Mon Sep 6 07:05:12 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: 12476349 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 29901C433FE for ; Mon, 6 Sep 2021 07:05:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0C78361004 for ; Mon, 6 Sep 2021 07:05:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239863AbhIFHGc (ORCPT ); Mon, 6 Sep 2021 03:06:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44414 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231325AbhIFHG1 (ORCPT ); Mon, 6 Sep 2021 03:06:27 -0400 Received: from mail-wr1-x42a.google.com (mail-wr1-x42a.google.com [IPv6:2a00:1450:4864:20::42a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7E5FDC061757 for ; Mon, 6 Sep 2021 00:05:23 -0700 (PDT) Received: by mail-wr1-x42a.google.com with SMTP id u9so8206660wrg.8 for ; Mon, 06 Sep 2021 00:05:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=gv0MrRvKKm19V0OiQaRrFOIJc5k/QdkOxkmFwBADi9Q=; b=Kyn7aE3gAuBNNLc/80cuIEyxxBCWUi1DBkBU+CAcLXxWULwrS8vy1AsxCv4EOWSqda j0s5SUvvxTlpGbKmG6/SqIhJT+W3CeL9AVgS9io1YHiS/JEKxtM6f/H8i5TGioHdm9eg TQwfbqlUrE0iYDAOU61KYMe3eKA1AqxTLshw9IPL2MSXApUR3ynZawThAUBok1FDKoVh yrn4r1PV7JRQTFS/jFGDmm99MoZ5mPhK1oS+fEbUTRh4ufpIzfuAQY1q4kkdU631WYHm n63C78IB9WaRCNl4NhT9xgeB3qg7wICyf+uXBKl2qBBzxz2TFDJG5noodJ8ofsiBNK4B 2log== 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=gv0MrRvKKm19V0OiQaRrFOIJc5k/QdkOxkmFwBADi9Q=; b=Ei+3ZgUh9Vba2hi076lTaSuNrOdM/UREclabGY9jydGdbsgd1lt9DRNYMORrsf1woO PjJOu+N4DllflZfCgVIjP0L1meFaRC9YE2L839qowcCNy1rqO3mlvc1+QP7ZN2xmovO+ BjJJ84hy08OvG12px+UF//4HuVsvAy4RD8l66vtWPFJTd4j0Ob1ywjJWX9VAUNkXuMsh FB1SzyB4+8SnFmrNPIPx5DCHNtidUiuS6JH7SlZrZZCIfo6drgKtHubeWbObzuPWh4ub OdhabkFUjQ6L1K0aaO2ZAgdJeVWBzPQUbBCqCHyfT0i/6ih+JW+qn7iHhEHqpAtToNyi xAXg== X-Gm-Message-State: AOAM533Y54gCSR2RbeWtgd1AXBNng4QYzc4tAaA9WMcJSu/oSedb6wiQ 8Adjd2v3h/FideBtJZ0T524JipnQtq6bpA== X-Google-Smtp-Source: ABdhPJzRFbaCU/8plO6qz6DOGNmObTgSSqIfTcf4qR3tUuPn78GckgpY7gvp94ANyJ6niEvub02fdg== X-Received: by 2002:a05:6000:160d:: with SMTP id u13mr11818689wrb.17.1630911921871; Mon, 06 Sep 2021 00:05:21 -0700 (PDT) Received: from vm.nix.is (vm.nix.is. [2a01:4f8:120:2468::2]) by smtp.gmail.com with ESMTPSA id f17sm8076684wrt.63.2021.09.06.00.05.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Sep 2021 00:05:21 -0700 (PDT) From: =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= To: git@vger.kernel.org Cc: Junio C Hamano , Jeff King , Johannes Schindelin , Eric Wong , Prathamesh Chavan , Peter Baumann , Philippe Blain , Andrei Rybak , =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFy?= =?utf-8?b?bWFzb24=?= Subject: [PATCH v2 1/7] git-sh-setup: remove unused git_pager() function Date: Mon, 6 Sep 2021 09:05:12 +0200 Message-Id: X-Mailer: git-send-email 2.33.0.821.gfd4106eadbd In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Remove the git_pager() function last referenced by non-test code in 49eb8d39c78 (Remove contrib/examples/*, 2018-03-25). We can also remove the test for this added in 995bc22d7f8 (pager: move pager-specific setup into the build, 2016-08-04), the test that actually matters is the one added in e54c1f2d253 (pager: set LV=-c alongside LESS=FRSX, 2014-01-06) just above the removed test. I.e. we don't care if the "LESS" and "LV" variables are set by git-sh-setup anymore, no built-in uses them, we do care that pager.c sets them, which we still test for. Signed-off-by: Ævar Arnfjörð Bjarmason --- git-sh-setup.sh | 16 ---------------- t/t7006-pager.sh | 13 ------------- 2 files changed, 29 deletions(-) diff --git a/git-sh-setup.sh b/git-sh-setup.sh index 10d97641856..7ee4b0edff5 100644 --- a/git-sh-setup.sh +++ b/git-sh-setup.sh @@ -157,22 +157,6 @@ git_editor() { eval "$GIT_EDITOR" '"$@"' } -git_pager() { - if test -t 1 - then - GIT_PAGER=$(git var GIT_PAGER) - else - GIT_PAGER=cat - fi - for vardef in @@PAGER_ENV@@ - do - var=${vardef%%=*} - eval ": \"\${$vardef}\" && export $var" - done - - eval "$GIT_PAGER" '"$@"' -} - sane_grep () { GREP_OPTIONS= LC_ALL=C grep @@SANE_TEXT_GREP@@ "$@" } diff --git a/t/t7006-pager.sh b/t/t7006-pager.sh index 0e7cf75435e..08f712a4497 100755 --- a/t/t7006-pager.sh +++ b/t/t7006-pager.sh @@ -49,19 +49,6 @@ test_expect_success TTY 'LESS and LV envvars are set for pagination' ' grep ^LV= pager-env.out ' -test_expect_success !MINGW,TTY 'LESS and LV envvars set by git-sh-setup' ' - ( - sane_unset LESS LV && - PAGER="env >pager-env.out; wc" && - export PAGER && - PATH="$(git --exec-path):$PATH" && - export PATH && - test_terminal sh -c ". git-sh-setup && git_pager" - ) && - grep ^LESS= pager-env.out && - grep ^LV= pager-env.out -' - test_expect_success TTY 'some commands do not use a pager' ' rm -f paginated.out && test_terminal git rev-list HEAD && From patchwork Mon Sep 6 07:05:13 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: 12476343 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 7C85AC433EF for ; Mon, 6 Sep 2021 07:05:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5E3FB60F9E for ; Mon, 6 Sep 2021 07:05:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239834AbhIFHGb (ORCPT ); Mon, 6 Sep 2021 03:06:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44420 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238731AbhIFHG2 (ORCPT ); Mon, 6 Sep 2021 03:06:28 -0400 Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 525FDC06175F for ; Mon, 6 Sep 2021 00:05:24 -0700 (PDT) Received: by mail-wr1-x42e.google.com with SMTP id v10so8219625wrd.4 for ; Mon, 06 Sep 2021 00:05:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=R/babb/TCWMJcK75N9R4vjAws0MQuNP40ct4OHCI2mY=; b=NUz18+CSLuyZ8kqqKal+Scr5hkGufWHi5CRl7OZlJQxdnTCZnf1HbmpTMiFsTdSu7F Xjvwgb7nvGAe35we5jeJ2I2ufirHqrVfQcdFqthYcUVH1qdYeNLlyRv8ciJTSp7YmvXJ XWdOjYB2+u2kisIrSAipD8fuiPjiX5meokXiCDfsLoufALR9He2q37i46gkZ78zrArcm E//+0hIl2e2Ih4M5M8y0J2lDboumISoMqmP7spOpy2TZDrBsSQEbPkQI/abaADBVlLBn JpQXxAv3eRJxdZHphOw2Pk5QvjepupK1XL0oQ8r7Uy/BgeNdmwRpE2xfrOoRX9slNXaL 09Pg== 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=R/babb/TCWMJcK75N9R4vjAws0MQuNP40ct4OHCI2mY=; b=AsN0IMkcL/S+hoPkOt6TDOHm6nRsRbyQ4Ky2my8yTDD8KAWNUb5bjWnd2ZDkKmTK2a lDcrvSndiJvjpdMGY+mdZs3fvmFIUCYwNGLqMVB4jcTtvRhNISDodSyYmfYepSB8zyeX I6JtVCvTCotIFJN9vUR3exehvygrOSzqejVlxEd6pLOdtq+VHNuOW+tXZLDvQ4tQh8cL 8UPRCoOgtEUlWCFVpcVFZ/NjGsqxCAv0+HZbtDN8rQncnd6MOQvMVQ2xzfgQfUOcfSss R4oZ1zwzKjjFEizVXKEjCko+A1gMntQ4rLGxe9PFrOdb9FZ9E6oil7YT3H4lkXfzMXYS dcCA== X-Gm-Message-State: AOAM532sykunbzk/DH7VN9t1ZDz6FS2WWOeL0qtdpHtL320mq9L5HyFk Y2XADFClAXrPiNnjXykmQ54GHyiq9XcIow== X-Google-Smtp-Source: ABdhPJzayqXkpE0lFf679ZgjGwsoO36VIKfvUV7Q1lcvPN/rJo7WvRA5EJ2sGLDYs0zyYgo3xIN0Zg== X-Received: by 2002:a05:6000:160c:: with SMTP id u12mr11529635wrb.100.1630911922651; Mon, 06 Sep 2021 00:05:22 -0700 (PDT) Received: from vm.nix.is (vm.nix.is. [2a01:4f8:120:2468::2]) by smtp.gmail.com with ESMTPSA id f17sm8076684wrt.63.2021.09.06.00.05.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Sep 2021 00:05:22 -0700 (PDT) From: =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= To: git@vger.kernel.org Cc: Junio C Hamano , Jeff King , Johannes Schindelin , Eric Wong , Prathamesh Chavan , Peter Baumann , Philippe Blain , Andrei Rybak , =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFy?= =?utf-8?b?bWFzb24=?= Subject: [PATCH v2 2/7] git-sh-setup: remove unused sane_egrep() function Date: Mon, 6 Sep 2021 09:05:13 +0200 Message-Id: X-Mailer: git-send-email 2.33.0.821.gfd4106eadbd In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org The is_zero_oid() function in git-submodule.sh has not been used since e83e3333b57 (submodule: port submodule subcommand 'summary' from shell to C, 2020-08-13), so we can remove it, and the sane_egrep() function, dead is_zero_oid() was the only function which still referenced it. Signed-off-by: Ævar Arnfjörð Bjarmason --- git-sh-setup.sh | 4 ---- git-submodule.sh | 5 ----- 2 files changed, 9 deletions(-) diff --git a/git-sh-setup.sh b/git-sh-setup.sh index 7ee4b0edff5..c170be07c7d 100644 --- a/git-sh-setup.sh +++ b/git-sh-setup.sh @@ -161,10 +161,6 @@ sane_grep () { GREP_OPTIONS= LC_ALL=C grep @@SANE_TEXT_GREP@@ "$@" } -sane_egrep () { - GREP_OPTIONS= LC_ALL=C egrep @@SANE_TEXT_GREP@@ "$@" -} - is_bare_repository () { git rev-parse --is-bare-repository } diff --git a/git-submodule.sh b/git-submodule.sh index dbd2ec20503..aeb96c58243 100755 --- a/git-submodule.sh +++ b/git-submodule.sh @@ -63,11 +63,6 @@ isnumber() n=$(($1 + 0)) 2>/dev/null && test "$n" = "$1" } -# Given a full hex object ID, is this the zero OID? -is_zero_oid () { - echo "$1" | sane_egrep '^0+$' >/dev/null 2>&1 -} - # Sanitize the local git environment for use within a submodule. We # can't simply use clear_local_git_env since we want to preserve some # of the settings from GIT_CONFIG_PARAMETERS. From patchwork Mon Sep 6 07:05:14 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: 12476345 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 90B50C433F5 for ; Mon, 6 Sep 2021 07:05:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 75D7061004 for ; Mon, 6 Sep 2021 07:05:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239882AbhIFHGc (ORCPT ); Mon, 6 Sep 2021 03:06:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44422 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239827AbhIFHG3 (ORCPT ); Mon, 6 Sep 2021 03:06:29 -0400 Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 13185C0613C1 for ; Mon, 6 Sep 2021 00:05:25 -0700 (PDT) Received: by mail-wr1-x42d.google.com with SMTP id q26so7283822wrc.7 for ; Mon, 06 Sep 2021 00:05:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=J4rtb0XNUxakAicw8Jq10ClElIOFsvKBp8Y5s1rPmGA=; b=Dr1CeVLpH0nK2+n5ubdQuk7U3NLNcWwe7n/CYVwyQA3BRueBvZ0aciFxZoFipexnPK PSWjf2VqYicX/HoSRhUTVYuNzG+U1iENn87Sprw8/JA7lID5yRiQsLfadKTQf3VHEO8p duRfB9cGcsZ5A5vVn3sblidB0Krup5dPnDsOb1tHB0PxZVUdSIiY57pkJ26bD3EYvJOV TT7NLAHUbY3d/A07f1jVpxsX7/7GBgs2on5P/8ciIF0iYJsFmR3TyMq3LxAF0uS6gvMl iY/Cb3Me44LmKP4Y5mKaBU8zolbmoYsCzz9DSEGgINBjHMg1z7IKQ/MuHNWOfXotHqb5 ASSg== 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=J4rtb0XNUxakAicw8Jq10ClElIOFsvKBp8Y5s1rPmGA=; b=pfeFmUhL+cRIMT4o5gXU51lVvFCp/0RxEpZX/aLp7Mz21b/bSBrt8l+df3dw5kt2mw xFz2i2UPVHWNq/YQcnCYonLDAypG2H8CzSxDezcER5RCSANKvMu9MkmEbIk6X0t7f8yi 5lv073r/0q1Q0Cz04eVPPY38YfVhe4X9GBR8hgLbl+khaiU29KvQ98Xx1vIWrV8XPxPk pymm8mjNI5oKIS+i+ycBovOS1ggLPE6mYYRCEPlJjDqjgJ2W3quDgtFQl91phpuEXK3v Ybit02fgj1ls02BSf+b7BVG4+u6JEQWv4+vuTvWy6hYnn6FNiTqXDo8dguNmptYfE1XX XO5g== X-Gm-Message-State: AOAM530MIDwCeziPQZlyV18K2cNWUDNeso597BQ4slKdnAyxLEtd9I5t fRRYFq2XoHj5ApUo8OYDx/ahHrG0acy2MA== X-Google-Smtp-Source: ABdhPJz0thiivKVjj1ACBszfT8UXsAnOZe+PHWkEo6Utgnw0lXRhLjuPlMmxPxxrFjvu/WDRTYbw2w== X-Received: by 2002:adf:f645:: with SMTP id x5mr11387191wrp.353.1630911923435; Mon, 06 Sep 2021 00:05:23 -0700 (PDT) Received: from vm.nix.is (vm.nix.is. [2a01:4f8:120:2468::2]) by smtp.gmail.com with ESMTPSA id f17sm8076684wrt.63.2021.09.06.00.05.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Sep 2021 00:05:23 -0700 (PDT) From: =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= To: git@vger.kernel.org Cc: Junio C Hamano , Jeff King , Johannes Schindelin , Eric Wong , Prathamesh Chavan , Peter Baumann , Philippe Blain , Andrei Rybak , =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFy?= =?utf-8?b?bWFzb24=?= Subject: [PATCH v2 3/7] git-sh-setup: move peel_committish() function to git-subtree.sh Date: Mon, 6 Sep 2021 09:05:14 +0200 Message-Id: X-Mailer: git-send-email 2.33.0.821.gfd4106eadbd In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Move the peel_committish() function out of git-sh-setup to its only user, contrib/subtree/git-subtree.sh. Since d03ebd411c6 (rebase: remove the rebase.useBuiltin setting, 2019-03-18) when git-legacy-rebase.sh was removed, it has only been used in git-subtree.sh. Signed-off-by: Ævar Arnfjörð Bjarmason --- contrib/subtree/git-subtree.sh | 12 ++++++++++++ git-sh-setup.sh | 12 ------------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/contrib/subtree/git-subtree.sh b/contrib/subtree/git-subtree.sh index 7f767b5c38f..a6deb57bcae 100755 --- a/contrib/subtree/git-subtree.sh +++ b/contrib/subtree/git-subtree.sh @@ -818,6 +818,18 @@ cmd_add_repository () { cmd_add_commit FETCH_HEAD } +peel_committish () { + case "$1" in + :/*) + peeltmp=$(git rev-parse --verify "$1") && + git rev-parse --verify "${peeltmp}^0" + ;; + *) + git rev-parse --verify "${1}^0" + ;; + esac +} + # Usage: cmd_add_commit REV cmd_add_commit () { # The rev has already been validated by cmd_add(), we just diff --git a/git-sh-setup.sh b/git-sh-setup.sh index c170be07c7d..3fc8830cb36 100644 --- a/git-sh-setup.sh +++ b/git-sh-setup.sh @@ -365,15 +365,3 @@ if test -z "$NONGIT_OK" then git_dir_init fi - -peel_committish () { - case "$1" in - :/*) - peeltmp=$(git rev-parse --verify "$1") && - git rev-parse --verify "${peeltmp}^0" - ;; - *) - git rev-parse --verify "${1}^0" - ;; - esac -} From patchwork Mon Sep 6 07:05:15 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: 12476353 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 C5A22C433EF for ; Mon, 6 Sep 2021 07:05:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AC3C760F92 for ; Mon, 6 Sep 2021 07:05:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239906AbhIFHGf (ORCPT ); Mon, 6 Sep 2021 03:06:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44428 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239829AbhIFHGa (ORCPT ); Mon, 6 Sep 2021 03:06:30 -0400 Received: from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com [IPv6:2a00:1450:4864:20::42b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DD3B7C0613CF for ; Mon, 6 Sep 2021 00:05:25 -0700 (PDT) Received: by mail-wr1-x42b.google.com with SMTP id m9so8255381wrb.1 for ; Mon, 06 Sep 2021 00:05:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=UfhI+MD4SQEg+/6VZJpd76yUTzMXwr340ZO6HPZWdlQ=; b=l9qt379wk+2AHVzs4aVkqT4/44PDjttS289Zl7l2wq/9xrOu8KGkr6Ef6ylogqtg30 tNL7NY0dWtVeFRux9T9i78LytBnuNprXwXCa0SqJ/egwoz3pnt9b7nYZJmOWFsSWpRNX jFKfXq1U5QQwMI6mfZ849KA2lDa4zCnxCEhPotn0Dfgd4EuMplo7aSd63IDG1tQ9ZQMt U/Lx65R8QTKv6eazyCNZIchEtWHHik5zsXCQhnhbjDInGgqmqj9bpdbvLA6MVChS+WT2 gc3Qi8WErI9m8wrVpWu+/6grFYZg+V4iT8z4dbuNYiZovqLlyZO9vGNR8rT194DL+5e/ JR9Q== 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=UfhI+MD4SQEg+/6VZJpd76yUTzMXwr340ZO6HPZWdlQ=; b=pFJlQyWBO5tRxk8ZsqCCzUfi5Fygbbd631fb5UXTlH5FLIRhvPOHLbWSFKHmbMKXcs ab0Xj/kUEp5qu55lczYF2ZkL4fPJ7feU7I0PyDrsTpKkQ3xYNCzSsEy0NeI1p922HsY1 NEEz7uD6T/nJEsgHYtbGFmMdO7b8efoGIcUrcpGym0XOawvOQnzhejY0bBcjACchSEI3 UB/7cMoKQtrB+MD5diGxPyKRZUe5ppwVRK/0ry+UqDDrR8+3RjVPehyFI3TaxAWUcNLg LUgwM8rEzb7KfCYaiYa6my7CCkocfjogD6+im3J3aFT0s0jH/B139heIRztxETq1jSVP qNVw== X-Gm-Message-State: AOAM533cnE68A6zlxLwkmbixvh2BEY8H3AGKHcbfvolL8eURRmfSJ3AU bK4flfLy73CXdkV7BPlGYWpeEa0e31agTw== X-Google-Smtp-Source: ABdhPJwZTRUoa0OL35moYWBf65RDecr/WXzdnCAu55080ZbsMsXO/Bp/mUwm5GqcpYBI1um4rTkjXg== X-Received: by 2002:a5d:470b:: with SMTP id y11mr11782503wrq.213.1630911924245; Mon, 06 Sep 2021 00:05:24 -0700 (PDT) Received: from vm.nix.is (vm.nix.is. [2a01:4f8:120:2468::2]) by smtp.gmail.com with ESMTPSA id f17sm8076684wrt.63.2021.09.06.00.05.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Sep 2021 00:05:23 -0700 (PDT) From: =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= To: git@vger.kernel.org Cc: Junio C Hamano , Jeff King , Johannes Schindelin , Eric Wong , Prathamesh Chavan , Peter Baumann , Philippe Blain , Andrei Rybak , =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFy?= =?utf-8?b?bWFzb24=?= Subject: [PATCH v2 4/7] git-sh-setup: clear_local_git_env() function to git-submodule.sh Date: Mon, 6 Sep 2021 09:05:15 +0200 Message-Id: X-Mailer: git-send-email 2.33.0.821.gfd4106eadbd In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Since 14111fc4927 (git: submodule honor -c credential.* from command line, 2016-02-29) the clear_local_git_env() function has only been used in the sanitize_submodule_env() function, let's inline its one-line functionality there. Signed-off-by: Ævar Arnfjörð Bjarmason --- git-sh-setup.sh | 7 ------- git-submodule.sh | 2 +- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/git-sh-setup.sh b/git-sh-setup.sh index 3fc8830cb36..b3a97d6455a 100644 --- a/git-sh-setup.sh +++ b/git-sh-setup.sh @@ -290,13 +290,6 @@ get_author_ident_from_commit () { parse_ident_from_commit author AUTHOR } -# Clear repo-local GIT_* environment variables. Useful when switching to -# another repository (e.g. when entering a submodule). See also the env -# list in git_connect() -clear_local_git_env() { - unset $(git rev-parse --local-env-vars) -} - # Generate a virtual base file for a two-file merge. Uses git apply to # remove lines from $1 that are not in $2, leaving only common lines. create_virtual_base() { diff --git a/git-submodule.sh b/git-submodule.sh index aeb96c58243..c9dca58fdaa 100755 --- a/git-submodule.sh +++ b/git-submodule.sh @@ -69,7 +69,7 @@ isnumber() sanitize_submodule_env() { save_config=$GIT_CONFIG_PARAMETERS - clear_local_git_env + unset $(git rev-parse --local-env-vars) GIT_CONFIG_PARAMETERS=$save_config export GIT_CONFIG_PARAMETERS } From patchwork Mon Sep 6 07:05:16 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: 12476351 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 98984C43217 for ; Mon, 6 Sep 2021 07:05:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7BB6F60F6E for ; Mon, 6 Sep 2021 07:05:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239886AbhIFHGe (ORCPT ); Mon, 6 Sep 2021 03:06:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44434 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239832AbhIFHGa (ORCPT ); Mon, 6 Sep 2021 03:06:30 -0400 Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 921CDC061575 for ; Mon, 6 Sep 2021 00:05:26 -0700 (PDT) Received: by mail-wr1-x432.google.com with SMTP id q26so7283923wrc.7 for ; Mon, 06 Sep 2021 00:05:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=bPK7vU5qGoeM0mxEi1omxvUHbJ0G1avanmLiBIKHiso=; b=IpIFDecw/VlAuBzvnv7LZZsCcsrfj9yr9rQQpr9tgfOKlxU0Sz69/2iQ8ETtSayKck XObqlvhd6/ws3Uj935oVm1i3P7xDZVKHsTso47fPmv6WBiyYrRnFb19XYhknuXvjvPms asIeCfNy9tQ516Wlom9H5VzUSZk9eNeySuPstB7SFRH6pjXicpgkhwsZ/59LYxXO0wIH J2OUOGxgBq9rtugI2O+AOZg78JJ52OaczrEYvxlRcslepgdiz/2zkiVviEFWlIO03YGo 9wlnGXrSHIGVj86Ek0yibFGPH5x4fzf0+BiETbtMvHFlJrV3NhOrwy/O/xoTd0zI+Dhw Z9+g== 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=bPK7vU5qGoeM0mxEi1omxvUHbJ0G1avanmLiBIKHiso=; b=Xb8B9SalUX89LLqVVrFlqwIH9P8ilrXmNG0hUJ+MBM+wXJ1nEyEkOQCR2S9AvvfsWb IiDzLxPf+B/3WRHdfM2Qb1ZHAMB71Xuo5jivQtvBVcjyUf+Hk7SY/UTHpzCm6hWOB4ds BQZpy7Q4RugQLfRTa5PJS7VrwMoU9d3MdQ27KbeIOr+yYbMR4UtPMSNEZRWs17594asY bGRt7Q4ZEzz4qzNOOOsEu3Vgq/6JAMnV/Bp3U0ieEJcFwb6KsYVvGuH7A0pBoqGRsuNL U+UXEZZu2DMfsyeY7p94KFZh/ak2Nj4to7NaucwyGMOr07yqtghV6Xg/1mOk5/IvD9Lw baGw== X-Gm-Message-State: AOAM533p2puEZoEb/a27A43Y+LYTstEQ7gUGenu5bh6Ms2GrCsw2B9e+ NOcUOF5d5O2p9aFKj6PwtGVCUuCyVAHANw== X-Google-Smtp-Source: ABdhPJwzF5KksOmRPvz4U+PCAWY3HIYavFBl13Jq6CwAnJRIWwbTZiAl6hVY80s5uYcPJ7FS2G48Rw== X-Received: by 2002:adf:9003:: with SMTP id h3mr11473128wrh.75.1630911924932; Mon, 06 Sep 2021 00:05:24 -0700 (PDT) Received: from vm.nix.is (vm.nix.is. [2a01:4f8:120:2468::2]) by smtp.gmail.com with ESMTPSA id f17sm8076684wrt.63.2021.09.06.00.05.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Sep 2021 00:05:24 -0700 (PDT) From: =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= To: git@vger.kernel.org Cc: Junio C Hamano , Jeff King , Johannes Schindelin , Eric Wong , Prathamesh Chavan , Peter Baumann , Philippe Blain , Andrei Rybak , =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFy?= =?utf-8?b?bWFzb24=?= Subject: [PATCH v2 5/7] git-sh-setup: remove unused "pull with rebase" message Date: Mon, 6 Sep 2021 09:05:16 +0200 Message-Id: X-Mailer: git-send-email 2.33.0.821.gfd4106eadbd In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Remove the "pull with rebase" message previously used by the git-pull.sh script, which was removed in 49eb8d39c78 (Remove contrib/examples/*, 2018-03-25). Signed-off-by: Ævar Arnfjörð Bjarmason --- git-sh-setup.sh | 6 ------ 1 file changed, 6 deletions(-) diff --git a/git-sh-setup.sh b/git-sh-setup.sh index b3a97d6455a..acbd05fe25b 100644 --- a/git-sh-setup.sh +++ b/git-sh-setup.sh @@ -203,9 +203,6 @@ require_clean_work_tree () { "rewrite branches") gettextln "Cannot rewrite branches: You have unstaged changes." >&2 ;; - "pull with rebase") - gettextln "Cannot pull with rebase: You have unstaged changes." >&2 - ;; *) eval_gettextln "Cannot \$action: You have unstaged changes." >&2 ;; @@ -222,9 +219,6 @@ require_clean_work_tree () { rebase) gettextln "Cannot rebase: Your index contains uncommitted changes." >&2 ;; - "pull with rebase") - gettextln "Cannot pull with rebase: Your index contains uncommitted changes." >&2 - ;; *) eval_gettextln "Cannot \$action: Your index contains uncommitted changes." >&2 ;; From patchwork Mon Sep 6 07:05:17 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: 12476355 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 5460AC433F5 for ; Mon, 6 Sep 2021 07:05:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 39D4760F92 for ; Mon, 6 Sep 2021 07:05:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239923AbhIFHGi (ORCPT ); Mon, 6 Sep 2021 03:06:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44438 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238731AbhIFHGb (ORCPT ); Mon, 6 Sep 2021 03:06:31 -0400 Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 803ADC061575 for ; Mon, 6 Sep 2021 00:05:27 -0700 (PDT) Received: by mail-wr1-x432.google.com with SMTP id b6so8214567wrh.10 for ; Mon, 06 Sep 2021 00:05:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=VJwmq6IXub8UNsck8+vyuYxBax7co6lDEfVRBK7ayNk=; b=A4c8NaDVWJn4ymbxvxJL7j+dZUsV0/dZ+0DJMRPKHIbOvzmiRTsNt1GYh5YrqpplHf mHxMg5x0tq3ryHXapc2jxeIGTqRHFlprl8xxitjSNujZA+JBMfEQaL/tAnft8fJ/AI5U X9NvQBHfoOzRukHKreEeQqFNYZQMHmkXKIl2lNy08DCBxE3h6jxKUO9Y1vbI/os4HIne B9XhI5JYUXEBBq6KCzaZUj8wo+IgKeOGnASY78XjQbKE5DoZP+ia1huMOraVJtDMG2oy rQdT7xfFrUvq76CWzBeu5ppgV2NjCW4W/T63U8qrTKrNjtGFfP1rdTTMXZ24Kq+SMoDR qpcw== 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=VJwmq6IXub8UNsck8+vyuYxBax7co6lDEfVRBK7ayNk=; b=l9qq/kuZ/7UV4FcUSwhOjf3pW3H9LDZMoD7k2QabxKEVbrygt1uHosjZPjWY/xynZp 1kIstCwvbWMGMN/Tl5z2G+EKeNrj1DQfYWfW8A52fJ6BrQsyofTJI2gDFRDs6lfhPbQ1 fZ27F2BSKvxiL9HmtgwIPYoTXVRYZouT2SB3adAo+bWwHLgHGlsf3qI+tRGZwo7hg6GY c/kzhlKbZk9y1VrtQvNBBoC0QUNbj24GUFFYi0/u62vU7TQ7ykgYt43jaPHqxwrOAbKr 252hHSWSFbZYX+OFTDYN3Sa3TECS2IHl65kRMuwZEet9adetwfn0ZFC1VVKrGPLTHtqR LNkQ== X-Gm-Message-State: AOAM5313IWT9wsTyFl6msIk7LVQm7w0qyJcRnx+FBKpTFholbgCvJUpY 6P5dBpS+dir28hnkzCqB+B1CaJVKsASrIw== X-Google-Smtp-Source: ABdhPJwtydkCDD0ft9XTVyDDsOafcY2bCGdD+ixiLakeVKx8oiNS7bE6x1Id2k16eN3Y8xYduQvKug== X-Received: by 2002:a5d:44ca:: with SMTP id z10mr11313356wrr.298.1630911925827; Mon, 06 Sep 2021 00:05:25 -0700 (PDT) Received: from vm.nix.is (vm.nix.is. [2a01:4f8:120:2468::2]) by smtp.gmail.com with ESMTPSA id f17sm8076684wrt.63.2021.09.06.00.05.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Sep 2021 00:05:25 -0700 (PDT) From: =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= To: git@vger.kernel.org Cc: Junio C Hamano , Jeff King , Johannes Schindelin , Eric Wong , Prathamesh Chavan , Peter Baumann , Philippe Blain , Andrei Rybak , =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFy?= =?utf-8?b?bWFzb24=?= Subject: [PATCH v2 6/7] git-bisect: remove unused SHA-1 $x40 shell variable Date: Mon, 6 Sep 2021 09:05:17 +0200 Message-Id: X-Mailer: git-send-email 2.33.0.821.gfd4106eadbd In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org This variable was last used in code removed in 06f5608c14 (bisect--helper: `bisect_start` shell function partially in C, 2019-01-02). Signed-off-by: Ævar Arnfjörð Bjarmason --- git-bisect.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/git-bisect.sh b/git-bisect.sh index 6a7afaea8da..b59f3aaad43 100755 --- a/git-bisect.sh +++ b/git-bisect.sh @@ -34,8 +34,6 @@ Please use "git help bisect" to get the full man page.' OPTIONS_SPEC= . git-sh-setup -_x40='[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]' -_x40="$_x40$_x40$_x40$_x40$_x40$_x40$_x40$_x40" TERM_BAD=bad TERM_GOOD=good From patchwork Mon Sep 6 07:05:18 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: 12476357 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 24351C433EF for ; Mon, 6 Sep 2021 07:05:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0582960F9E for ; Mon, 6 Sep 2021 07:05:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239935AbhIFHGj (ORCPT ); Mon, 6 Sep 2021 03:06:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44440 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231325AbhIFHGc (ORCPT ); Mon, 6 Sep 2021 03:06:32 -0400 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 288D8C061575 for ; Mon, 6 Sep 2021 00:05:28 -0700 (PDT) Received: by mail-wr1-x434.google.com with SMTP id x6so8176860wrv.13 for ; Mon, 06 Sep 2021 00:05:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=YxGNs6njqVhfS4Amc5fe+UiGnzxP3sZoRpqPL7CNulg=; b=TYPZe/L0grcShUe+rshB/nziqhbedHTNsPq1vGn+rRbPE5+WP9i1EV2kC2Oo4woKX2 l4CwyYP1TT49tDhm2hRHFMraeiJGYmsoapBpNFBjv/6dO2WBNDDiukDx1B5CPY5CRAjv h1YsmeS4PqOGIajs9IpDnVWP1MAh6WcXUJDPgp0FcG+M+FSNn6kEejGjNsh/u6fqmCRC 2Xqporvc4TMISu0gd5E6hXlWnBfz2eCdu8b78i1nTywdITEISHNNVihZ0TjkVe8Qn4TB XxqZDGlc74V7EdKaHB88mIELAnrg+mfY/H8Xg3nd/4fUsDiR0lja3MMLe47XPAY73GZY GJuw== 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=YxGNs6njqVhfS4Amc5fe+UiGnzxP3sZoRpqPL7CNulg=; b=VVRFs9UlBt5tULsSMAqpo0yp/3nfI2lWOrWPGtlz9Wg3N9fav51EL2lyVYg3opHl8A kKYDOxZ90s02q7gxWB/ILj+GollJoNlNi3ZWHfLy9+CSFQ4uR3mCFYBa/NAOanINuILz L1+TPHnXZxQmgeIZRBsSnJOCE9C42tAu+rsxozOhSrqEJMIyiCYQBgT+JsXAVwrXxCCb VwdvIaOz+w+X1IBopRNrISCQcXRtwGQ/aFOkmztL/Bgd5lAjjmx1CUd9WPwcNaQBBt5P u/NED/wt2OoDoamIBta9ueQvxPV8ln4WAmPtJS5lpKGfFSADwS6u2vurPGvWxy6KOzaQ YRuw== X-Gm-Message-State: AOAM5311eOjc0lqhKMnqz0oENu2wkR4t21eHV649S+F4CDF/k54N2n0t PIC+WinTi5vu2aMRgzmbwuwsI7al5CSQNA== X-Google-Smtp-Source: ABdhPJxzxhDq/LfMAnjt5pC+q65qp1H/Nd9VR34tasPTfDfhC9yQdgJqm5F5HDFw2aT+/6H/bcfT+Q== X-Received: by 2002:adf:db07:: with SMTP id s7mr12006653wri.106.1630911926574; Mon, 06 Sep 2021 00:05:26 -0700 (PDT) Received: from vm.nix.is (vm.nix.is. [2a01:4f8:120:2468::2]) by smtp.gmail.com with ESMTPSA id f17sm8076684wrt.63.2021.09.06.00.05.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Sep 2021 00:05:26 -0700 (PDT) From: =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= To: git@vger.kernel.org Cc: Junio C Hamano , Jeff King , Johannes Schindelin , Eric Wong , Prathamesh Chavan , Peter Baumann , Philippe Blain , Andrei Rybak , =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFy?= =?utf-8?b?bWFzb24=?= Subject: [PATCH v2 7/7] test-lib: remove unused $_x40 and $_z40 variables Date: Mon, 6 Sep 2021 09:05:18 +0200 Message-Id: X-Mailer: git-send-email 2.33.0.821.gfd4106eadbd In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org These two have fallen out of use with the SHA-256 migration. The last use of $_x40 was removed in fc7e73d7ef (t4013: improve diff-post-processor logic, 2020-08-21) and The last use of $_z40 was removed in 7a868c51c2 (t5562: use $ZERO_OID, 2019-12-21), but it was then needlessly refactored to be hash-agnostic in 192b517589 (t: use hash-specific lookup tables to define test constants, 2020-02-22). We can just remove it. Signed-off-by: Ævar Arnfjörð Bjarmason --- t/test-lib.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/t/test-lib.sh b/t/test-lib.sh index abcfbed6d61..044a9231ae6 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -534,7 +534,7 @@ SQ=\' # when case-folding filenames u200c=$(printf '\342\200\214') -export _x05 _x35 _x40 _z40 LF u200c EMPTY_TREE EMPTY_BLOB ZERO_OID OID_REGEX +export _x05 _x35 LF u200c EMPTY_TREE EMPTY_BLOB ZERO_OID OID_REGEX # Each test should start with something like this, after copyright notices: # @@ -1422,10 +1422,9 @@ then fi # Convenience -# A regexp to match 5, 35 and 40 hexdigits +# A regexp to match 5 and 35 hexdigits _x05='[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]' _x35="$_x05$_x05$_x05$_x05$_x05$_x05$_x05" -_x40="$_x35$_x05" test_oid_init @@ -1434,7 +1433,6 @@ OID_REGEX=$(echo $ZERO_OID | sed -e 's/0/[0-9a-f]/g') OIDPATH_REGEX=$(test_oid_to_path $ZERO_OID | sed -e 's/0/[0-9a-f]/g') EMPTY_TREE=$(test_oid empty_tree) EMPTY_BLOB=$(test_oid empty_blob) -_z40=$ZERO_OID # Provide an implementation of the 'yes' utility; the upper bound # limit is there to help Windows that cannot stop this loop from