From patchwork Wed Nov 14 09:15:05 2018 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: 10682239 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BFC5C13BB for ; Wed, 14 Nov 2018 09:15:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B5A7C2AF60 for ; Wed, 14 Nov 2018 09:15:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A9EE02AF76; Wed, 14 Nov 2018 09:15:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5255B2AF60 for ; Wed, 14 Nov 2018 09:15:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732220AbeKNTRq (ORCPT ); Wed, 14 Nov 2018 14:17:46 -0500 Received: from mail-wr1-f68.google.com ([209.85.221.68]:34672 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728406AbeKNTRp (ORCPT ); Wed, 14 Nov 2018 14:17:45 -0500 Received: by mail-wr1-f68.google.com with SMTP id j26-v6so16393722wre.1 for ; Wed, 14 Nov 2018 01:15:21 -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=C8NdEGM5JVMOIv0iNJtS8e3wqrjVRRCOh3nDCLbwbmI=; b=QrDznH0bBKNWy4gS8nHrFc7irQBDorayAC3iGHUPHliGMtHe2pVg0+/heCwb6/yuiw T200EH9Frb1ceFqpb77RJPz1LpGUnF3a2taLnYlu8p89Cc1qNtp8NxNVVe0O8vwW0Xia Jfg1LvAiEoHjnYkyFBNLDl+JKjL6H+6A0TtWfvF2p/IUte0e9KoxiGtfi43bMN7lZCAw iRacKTCeDxqGRBdP6NsgOFevbmymLPY1AmaBnEkYWeCngUHKJbha1J7R8rhBTVp+qFtJ cvUAfGW3CjSx9Ige/MEHmnePywdDlGeog+tgE1vGTc0T722Jh+S7zyszBFJydfz1sAvv 2zZA== 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=C8NdEGM5JVMOIv0iNJtS8e3wqrjVRRCOh3nDCLbwbmI=; b=m4ZRwn9IBrYdYCjEUyKnFY2TfP6KrK5ED6Jw07siCdoNFpXfrkgfp13wbCL1hn8vGm PFvTrkQvSy476SuEWMEp/bAC82Ecu3zUrtIHRuYE+Utgwy77cJpiLVV9AdDf8XKiWE9D cVGkSW6tKV2khQ+nrIv1S6dfJDu0QH6rMYFhvtDqHlfLQfieT8EaD4J0hSkeVvFpiD4F 7SusYCUiHMrKuRYqSAaCs28FEKZfTGfwYHZz8WkrtZGSInd9IDEAlLS31WuaZwXWUiLI P0HNzCDh+ctjIrLYuEVqxC+kdnXhDjhbLvUs+3PKnomFdA8tKhW6q3+ZhpszW1q6sj6e ULBg== X-Gm-Message-State: AGRZ1gJbI6WIVdkT/ftAn8m8ZO00mI89k2QN0EnTBtFGTd36BKskT/fb PYH3thDqnIaHHAeXLxMaS61M+hTgyuc= X-Google-Smtp-Source: AJdET5fa4bq6brVc2VQiUtZaptBgbgc7z/uL5N2BD00hxURlX6rTUODNPBuoIYyQECQrKtcu8M1YZg== X-Received: by 2002:adf:e983:: with SMTP id h3-v6mr1042668wrm.58.1542186920164; Wed, 14 Nov 2018 01:15:20 -0800 (PST) Received: from u.nix.is ([2a01:4f8:190:5095::2]) by smtp.gmail.com with ESMTPSA id b10-v6sm16385228wrt.49.2018.11.14.01.15.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Nov 2018 01:15:19 -0800 (PST) From: =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= To: git@vger.kernel.org Cc: Junio C Hamano , Phillip Wood , Johannes Schindelin , gitgitgadget@gmail.com, Pratik Karki , Jeff King , =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= Subject: [PATCH v2 1/2] rebase doc: document rebase.useBuiltin Date: Wed, 14 Nov 2018 09:15:05 +0000 Message-Id: <20181114091506.1452-2-avarab@gmail.com> X-Mailer: git-send-email 2.19.1.1182.g4ecb1133ce In-Reply-To: <0181114090144.31412-1-avarab@gmail.com> References: <0181114090144.31412-1-avarab@gmail.com> MIME-Version: 1.0 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The rebase.useBuiltin variable introduced in 55071ea248 ("rebase: start implementing it as a builtin", 2018-08-07) was turned on by default in 5541bd5b8f ("rebase: default to using the builtin rebase", 2018-08-08), but had no documentation. Let's document it so that users who run into any stability issues with the C rewrite know there's an escape hatch[1], and make it clear that needing to turn off builtin rebase means you've found a bug in git. 1. https://public-inbox.org/git/87y39w1wc2.fsf@evledraar.gmail.com/ Signed-off-by: Ævar Arnfjörð Bjarmason --- Documentation/config/rebase.txt | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Documentation/config/rebase.txt b/Documentation/config/rebase.txt index 42e1ba7575..f079bf6b7e 100644 --- a/Documentation/config/rebase.txt +++ b/Documentation/config/rebase.txt @@ -1,3 +1,17 @@ +rebase.useBuiltin:: + Set to `false` to use the legacy shellscript implementation of + linkgit:git-rebase[1]. Is `true` by default, which means use + the built-in rewrite of it in C. ++ +The C rewrite is first included with Git version 2.20. This option +serves an an escape hatch to re-enable the legacy version in case any +bugs are found in the rewrite. This option and the shellscript version +of linkgit:git-rebase[1] will be removed in some future release. ++ +If you find some reason to set this option to `false` other than +one-off testing you should report the behavior difference as a bug in +git. + rebase.stat:: Whether to show a diffstat of what changed upstream since the last rebase. False by default. From patchwork Wed Nov 14 09:15:06 2018 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: 10682241 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E050014D6 for ; Wed, 14 Nov 2018 09:15:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D467F2AF60 for ; Wed, 14 Nov 2018 09:15:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C83A32AF76; Wed, 14 Nov 2018 09:15:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7425E2AF60 for ; Wed, 14 Nov 2018 09:15:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732256AbeKNTRs (ORCPT ); Wed, 14 Nov 2018 14:17:48 -0500 Received: from mail-wm1-f68.google.com ([209.85.128.68]:35392 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728406AbeKNTRr (ORCPT ); Wed, 14 Nov 2018 14:17:47 -0500 Received: by mail-wm1-f68.google.com with SMTP id t15-v6so14051155wmt.0 for ; Wed, 14 Nov 2018 01:15: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=tYu92jpZM5pA3pHlzML6smM/yb7977g4DKySmxn5DbU=; b=Zh8uMVXApeqRM0nsbsJ8NrfySTPUwzBBkHJk+I40yZ9P5SomhS+i9MpHL6Ufi9nVl0 weM9TUmpw66Zp2OW1L0pg+t/OVm0sYbnUl87I4ISskuRwOMOMR9xxBSSEM7LWbvzVb7k QFUH8/+87yVufnhks8Dw8BrRmJjfNWoMqX40IloANiL0ItiWZhFBP5UxRocaJalufabc 2oxfaE4bmnpme0JcDdgDvbpF+Z03XkDWYeh64gIG8482vR34+AeeaHsgt+OJnOd0wOzs Dc5+Xs6xrjnHYz89Fsy01oMGUUx8bKJxRP8+duREYly/n3pC2xQMhfvKJFOQ3J+/4Y8Q Cq/A== 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=tYu92jpZM5pA3pHlzML6smM/yb7977g4DKySmxn5DbU=; b=gCAM5J9cjqTgTOzMnuOEEJAiMaGPmI/0UWH11b1gNe9/pmLWKsEmUy+3yeHWHdN2Bq Z4sB3ujhOAnYWhgNKc/8M8vYTTu89SXyUtUga5z0wADoW3IPpaN6E5hBylsH8/XUxL5C m6RzD96ljEpkbk7vLBRc7T+iaP879hL9paTLB3MCpUHqXrMe0r8+pdBfQMKyLUEXt0N2 YPi3cWWsQbsVkpIMSusooQUojspBssux5UjVlb/p2zlJyK7Mu6zcN+cf8A7cSsynUe4K 3+ZgXdNkrT9vJfcPSXJ9bQwlQL4ZLv8nzJ77abugmn0milISQRMrwoIzXzLKVUdm20Mg bWKA== X-Gm-Message-State: AGRZ1gI11+nJBK/kq2Bie9De5QoZtuxP+zS8w8qxKXeWg8mi5ShQ5Ob5 oyxx/l4uk3U4EFStsuryskj5gGLAONU= X-Google-Smtp-Source: AJdET5d0f0Lsv/axDDccZ3RhVunO2pJPEEe4xGhtrwNFPK8wKpIn5J0cRX1xc6mZz8P9IkRW8xQCZg== X-Received: by 2002:a7b:cb59:: with SMTP id v25-v6mr1120997wmj.102.1542186921995; Wed, 14 Nov 2018 01:15:21 -0800 (PST) Received: from u.nix.is ([2a01:4f8:190:5095::2]) by smtp.gmail.com with ESMTPSA id b10-v6sm16385228wrt.49.2018.11.14.01.15.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Nov 2018 01:15:21 -0800 (PST) From: =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= To: git@vger.kernel.org Cc: Junio C Hamano , Phillip Wood , Johannes Schindelin , gitgitgadget@gmail.com, Pratik Karki , Jeff King , =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= Subject: [PATCH v2 2/2] tests: add a special setup where rebase.useBuiltin is off Date: Wed, 14 Nov 2018 09:15:06 +0000 Message-Id: <20181114091506.1452-3-avarab@gmail.com> X-Mailer: git-send-email 2.19.1.1182.g4ecb1133ce In-Reply-To: <0181114090144.31412-1-avarab@gmail.com> References: <0181114090144.31412-1-avarab@gmail.com> MIME-Version: 1.0 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add a GIT_TEST_REBASE_USE_BUILTIN=false test mode which is equivalent to running with rebase.useBuiltin=false. This is needed to spot that we're not introducing any regressions in the legacy rebase version while we're carrying both it and the new builtin version. Signed-off-by: Ævar Arnfjörð Bjarmason --- builtin/rebase.c | 5 ++++- t/README | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/builtin/rebase.c b/builtin/rebase.c index 0ee06aa363..68ad8c1149 100644 --- a/builtin/rebase.c +++ b/builtin/rebase.c @@ -48,7 +48,10 @@ static int use_builtin_rebase(void) { struct child_process cp = CHILD_PROCESS_INIT; struct strbuf out = STRBUF_INIT; - int ret; + int ret, env = git_env_bool("GIT_TEST_REBASE_USE_BUILTIN", -1); + + if (env != -1) + return env; argv_array_pushl(&cp.args, "config", "--bool", "rebase.usebuiltin", NULL); diff --git a/t/README b/t/README index 242497455f..3df5d12e46 100644 --- a/t/README +++ b/t/README @@ -339,6 +339,10 @@ for the index version specified. Can be set to any valid version GIT_TEST_PRELOAD_INDEX= exercises the preload-index code path by overriding the minimum number of cache entries required per thread. +GIT_TEST_REBASE_USE_BUILTIN=, when false, disables the +builtin version of git-rebase. See 'rebase.useBuiltin' in +git-config(1). + GIT_TEST_INDEX_THREADS= enables exercising the multi-threaded loading of the index for the whole test suite by bypassing the default number of cache entries and thread minimums. Setting this to 1 will make the