From patchwork Sat Jan 21 01:55:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Elijah Newren X-Patchwork-Id: 13110799 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 23492C38141 for ; Sat, 21 Jan 2023 01:55:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229661AbjAUBze (ORCPT ); Fri, 20 Jan 2023 20:55:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41510 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229623AbjAUBzc (ORCPT ); Fri, 20 Jan 2023 20:55:32 -0500 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 DE6CF73170 for ; Fri, 20 Jan 2023 17:55:30 -0800 (PST) Received: by mail-wr1-x42a.google.com with SMTP id q5so1620382wrv.0 for ; Fri, 20 Jan 2023 17:55:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date:from :references:in-reply-to:message-id:from:to:cc:subject:date :message-id:reply-to; bh=AZwxIcNCBhyuM9xa73Egxa/KXEsbmEo51Nawts7/CH8=; b=qXgA52zZNmm0a7XBSXpHESC5kdD3JHKjYT19ORYb8Lg0pG7lsd48IMLxr0J+Hsw52v qnL9zFCIPf+Ycg1xazBg0T5+XR04r+BTOVMjEnj2Dk+Y12OKOl9MOP1VoMfC0ViONmch cMaKc8AOORbvAoNmekcp4Xl32/0OypZ7XhSRE3p2dT9Uzr7TTfQzCOoehQbnEmQDr/Ts /sYfXmcldBgiz1u21QYGCpYH/6WoZU1r1CUA8hwGeRF4uzpQ4vD8JFGvhIRHLkxCiEOL qMIyeeaxM51WQdAuFGBrSF2w2ntGz5UPJqF7YI+Q9v4BNyDlR8nmIaQ6qgyBRKWktxMZ 7I+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date:from :references:in-reply-to:message-id:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=AZwxIcNCBhyuM9xa73Egxa/KXEsbmEo51Nawts7/CH8=; b=6GhM9476/gNBXem6jMFUrGJJkfZGO68aQkJQUDXX8IbNIuawMLasQd2RWpUTNl4xVF UaL0n3dVgbzYX/WuaiLL88cx4TMAn3hJ78P8ECHaO1ASl3AEpL9GwmpbMYX5PtCZlONY WfnKS7ZmX5Gvv1/6E1HMGfFVd/hfabKigF9nCFYfPgsRdp3DhG+NH+bM1RZz7D/xCSb+ FPpqGivy5PzCfZIpRL8QHfsrmKgboyjt2DigF9WpQLrngoqX0ttNYELMFrhTPXxLhjab dKC84dfWNWILXUvAbJk4JtqyTDXMnHwRJiBHwnpu3BVZt1IeRxkuDaAv+JExusK8jRJM pPhA== X-Gm-Message-State: AFqh2kr2iU4/pyUNnKjrS/2Cv+zPB7ecv05wSZ2DQHGvYz5H2WPqBnGB XAgmEG4VWhkfcZvJovHaSefLItEpHf0= X-Google-Smtp-Source: AMrXdXvDhYf5azy8eIALLoyEnsUPSHR0ckRu+kpNr+p1P1ZBKkXgBuBStsli7bgbFdMZVcCaKJN2zA== X-Received: by 2002:a5d:6f15:0:b0:2b9:28ef:24c9 with SMTP id ay21-20020a5d6f15000000b002b928ef24c9mr16656115wrb.39.1674266129025; Fri, 20 Jan 2023 17:55:29 -0800 (PST) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id l14-20020a5d526e000000b0028e55b44a99sm19297724wrc.17.2023.01.20.17.55.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Jan 2023 17:55:28 -0800 (PST) Message-Id: <9089834adeacb2233cb924f36a04b027dac76594.1674266126.git.gitgitgadget@gmail.com> In-Reply-To: References: Date: Sat, 21 Jan 2023 01:55:20 +0000 Subject: [PATCH v3 1/7] rebase: mark --update-refs as requiring the merge backend Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: Derrick Stolee , Elijah Newren , Eric Sunshine , Martin =?utf-8?b?w4VncmVu?= , Phillip Wood , Elijah Newren , Elijah Newren Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Elijah Newren From: Elijah Newren --update-refs is built in terms of the sequencer, which requires the merge backend. It was already marked as incompatible with the apply backend in the git-rebase manual, but the code didn't check for this incompatibility and warn the user. Check and error now. While at it, fix a typo in t3422...and fix some misleading wording (most options which used to be am-specific have since been implemented in the merge backend as well). Signed-off-by: Elijah Newren --- Documentation/git-rebase.txt | 2 ++ builtin/rebase.c | 3 +++ t/t3422-rebase-incompatible-options.sh | 15 ++++++++++----- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt index f9675bd24e6..00d21d7287d 100644 --- a/Documentation/git-rebase.txt +++ b/Documentation/git-rebase.txt @@ -623,6 +623,8 @@ start would be overridden by the presence of + If the configuration variable `rebase.updateRefs` is set, then this option can be used to override and disable this setting. ++ +See also INCOMPATIBLE OPTIONS below. INCOMPATIBLE OPTIONS -------------------- diff --git a/builtin/rebase.c b/builtin/rebase.c index 1481c5b6a5b..accd62fce48 100644 --- a/builtin/rebase.c +++ b/builtin/rebase.c @@ -1514,6 +1514,9 @@ int cmd_rebase(int argc, const char **argv, const char *prefix) } } + if (options.update_refs) + imply_merge(&options, "--update-refs"); + if (options.type == REBASE_UNSPECIFIED) { if (!strcmp(options.default_backend, "merge")) imply_merge(&options, "--merge"); diff --git a/t/t3422-rebase-incompatible-options.sh b/t/t3422-rebase-incompatible-options.sh index 6dabb05a2ad..9da39cd91c2 100755 --- a/t/t3422-rebase-incompatible-options.sh +++ b/t/t3422-rebase-incompatible-options.sh @@ -25,11 +25,11 @@ test_expect_success 'setup' ' ' # -# Rebase has lots of useful options like --whitepsace=fix, which are -# actually all built in terms of flags to git-am. Since neither -# --merge nor --interactive (nor any options that imply those two) use -# git-am, using them together will result in flags like --whitespace=fix -# being ignored. Make sure rebase warns the user and aborts instead. +# Rebase has a couple options which are specific to the apply backend, +# and several options which are specific to the merge backend. Flags +# from the different sets cannot work together, and we do not want to +# just ignore one of the sets of flags. Make sure rebase warns the +# user and aborts instead. # test_rebase_am_only () { @@ -60,6 +60,11 @@ test_rebase_am_only () { test_must_fail git rebase $opt --exec 'true' A " + test_expect_success "$opt incompatible with --update-refs" " + git checkout B^0 && + test_must_fail git rebase $opt --update-refs A + " + } test_rebase_am_only --whitespace=fix From patchwork Sat Jan 21 01:55:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Elijah Newren X-Patchwork-Id: 13110800 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 65515C27C76 for ; Sat, 21 Jan 2023 01:55:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229680AbjAUBzh (ORCPT ); Fri, 20 Jan 2023 20:55:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41550 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229648AbjAUBzd (ORCPT ); Fri, 20 Jan 2023 20:55: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 96CE871BF3 for ; Fri, 20 Jan 2023 17:55:31 -0800 (PST) Received: by mail-wr1-x429.google.com with SMTP id b7so6285753wrt.3 for ; Fri, 20 Jan 2023 17:55:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date:from :references:in-reply-to:message-id:from:to:cc:subject:date :message-id:reply-to; bh=Zd5G4Z+OrZbl/P0DHHaGnlAkAG4bR8xHytJ1leEchTo=; b=J7U9JxRqb6CQS9zPbOE9ao7JEfG7BmHmDVJNuwIKV36CZ1IIEGrCJcsSrUfJLysNRv rBSO3MdvmxqqRtwTLm8ubQBHFnVNdzlqYEcl8V7tbXM+Rs5lfV5Q4Wp0UJwLfC9ypwQ7 y2MBW2BR6YrtHNreea29lnkhX5bdg4bj+3gEm53vOxxvamWKUXYrxqvWFFdFvTF4VrfG lZCVOXtGsyggNFwyWRQ5hzoCe0UtbntdiMy5QJzQPv8b+c8QxdIpA7HCoitG7X4c0/cQ CPl/7Humb8D/4Vn55o0S5e63jKfKVIXGDZJ9DrmxQDmY5f77VB7BLm0Xrm5j/DoZdGpc /efQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date:from :references:in-reply-to:message-id:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Zd5G4Z+OrZbl/P0DHHaGnlAkAG4bR8xHytJ1leEchTo=; b=cjHZ/TVw+h2F7kJGVwcJQDm7Q7X19M5svkz9xTN0z+U5gYsf21oK1tpmFY9du9PWPS TpxY6Ll9Pr3wivnz3ldsd2lVyPHqjPK9rqztHb+fMKBWmVoa8vOevqTA/Hxsk6Pa84VH +/YoRnwtxcPRwCN6S3LHuIiS5n1AoPwG0K2gj0r3b3OrLNuNzgVFmi65kgMbwAHn+RbQ 2HXgtgEDAtaooHbRYuMhH9cju4NeiH1M9uuUAMiOMRkhWU26PNapL+7WbNjCVdWm5Fop Qef2StjSXpEmZAjWjgqxiIXy/GN+js6++xARLitix3NJ3ADjjSb+yirlzt9HO5wlMZSu AL/A== X-Gm-Message-State: AFqh2kp2H1MNr4tlkPNOvP+H4XCT4F35ssmDcINlBt0Tpe5ceilNzne3 ujOAU5+Jinmc+zP248mErL7bJi2/mLo= X-Google-Smtp-Source: AMrXdXt2Zb3PHnoFib1B2Gtg1MUIZRvag8ju0tZ104jFiRcCnFNHOR5rY+0GPY2lfHi8D5A47v8uwg== X-Received: by 2002:adf:aa8f:0:b0:2bf:5dc0:56c8 with SMTP id h15-20020adfaa8f000000b002bf5dc056c8mr3156726wrc.51.1674266129886; Fri, 20 Jan 2023 17:55:29 -0800 (PST) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id l7-20020a5d6747000000b002b57bae7174sm37541628wrw.5.2023.01.20.17.55.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Jan 2023 17:55:29 -0800 (PST) Message-Id: In-Reply-To: References: Date: Sat, 21 Jan 2023 01:55:21 +0000 Subject: [PATCH v3 2/7] rebase: flag --apply and --merge as incompatible Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: Derrick Stolee , Elijah Newren , Eric Sunshine , Martin =?utf-8?b?w4VncmVu?= , Phillip Wood , Elijah Newren , Elijah Newren Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Elijah Newren From: Elijah Newren Previously, we flagged options which implied --apply as being incompatible with options which implied --merge. But if both options were given explicitly, then we didn't flag the incompatibility. The same is true with --apply and --interactive. Add the check, and add some testcases to verify these are also caught. Signed-off-by: Elijah Newren --- builtin/rebase.c | 12 ++++++++++-- t/t3422-rebase-incompatible-options.sh | 3 +++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/builtin/rebase.c b/builtin/rebase.c index accd62fce48..2a5e0e8a7a0 100644 --- a/builtin/rebase.c +++ b/builtin/rebase.c @@ -920,6 +920,9 @@ static int parse_opt_am(const struct option *opt, const char *arg, int unset) BUG_ON_OPT_NEG(unset); BUG_ON_OPT_ARG(arg); + if (opts->type != REBASE_UNSPECIFIED && opts->type != REBASE_APPLY) + die(_("apply options and merge options cannot be used together")); + opts->type = REBASE_APPLY; return 0; @@ -933,8 +936,10 @@ static int parse_opt_merge(const struct option *opt, const char *arg, int unset) BUG_ON_OPT_NEG(unset); BUG_ON_OPT_ARG(arg); - if (!is_merge(opts)) - opts->type = REBASE_MERGE; + if (opts->type != REBASE_UNSPECIFIED && opts->type != REBASE_MERGE) + die(_("apply options and merge options cannot be used together")); + + opts->type = REBASE_MERGE; return 0; } @@ -948,6 +953,9 @@ static int parse_opt_interactive(const struct option *opt, const char *arg, BUG_ON_OPT_NEG(unset); BUG_ON_OPT_ARG(arg); + if (opts->type != REBASE_UNSPECIFIED && opts->type != REBASE_MERGE) + die(_("apply options and merge options cannot be used together")); + opts->type = REBASE_MERGE; opts->flags |= REBASE_INTERACTIVE_EXPLICIT; diff --git a/t/t3422-rebase-incompatible-options.sh b/t/t3422-rebase-incompatible-options.sh index 9da39cd91c2..9b9e78479f6 100755 --- a/t/t3422-rebase-incompatible-options.sh +++ b/t/t3422-rebase-incompatible-options.sh @@ -67,7 +67,10 @@ test_rebase_am_only () { } +# Check options which imply --apply test_rebase_am_only --whitespace=fix test_rebase_am_only -C4 +# Also check an explicit --apply +test_rebase_am_only --apply test_done From patchwork Sat Jan 21 01:55:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Elijah Newren X-Patchwork-Id: 13110801 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5E4D7C27C76 for ; Sat, 21 Jan 2023 01:55:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229725AbjAUBzn (ORCPT ); Fri, 20 Jan 2023 20:55:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41822 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229684AbjAUBzl (ORCPT ); Fri, 20 Jan 2023 20:55:41 -0500 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 91CD573AF5 for ; Fri, 20 Jan 2023 17:55:32 -0800 (PST) Received: by mail-wr1-x42d.google.com with SMTP id q5so1620417wrv.0 for ; Fri, 20 Jan 2023 17:55:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date:from :references:in-reply-to:message-id:from:to:cc:subject:date :message-id:reply-to; bh=plAJbCWypx9jd658PaOF7uuhWjzMqMCfFQvg/QJRHHo=; b=byUw6WP1l/ACXn+FWDfq2zwbjyvFpl1unsstZ7JC6HESyxS8S8JKlhdAt/LJL+9qai 5tlR8c7Is1jNvp/vJgthO4PfDZ/nBK0eyinj0RVpN6ezQ55XLfK7WcyrLSRszVNqECDl T+X6fu7U2+Yl1y3E0VbJqkXYPz0fNYwzfoRdpVxIte/A7N0CbH4L+bWTKwAEKvfBRUjo DSXlWo4DgLipD87SmHTluCowf4WwwDzZfTIDPWbT1+hdx69fXMTdFQ6ozOIXaLMcYD+1 8iIo1qApxFe6u1iMBH7oABCEKFyjMRHRHeWylIrtccb8Im3s7e0gG453UUaJR6g6ZFqo 3CTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date:from :references:in-reply-to:message-id:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=plAJbCWypx9jd658PaOF7uuhWjzMqMCfFQvg/QJRHHo=; b=qAOmYv+y+70QgR0kIJzwOXWuxobufG7akfv2KDic5UEWzY56gOQfGvfhbqH18FAYov JQUW7xNC0TlGZrsDcNyEv4RUjoAoCPxyhb4SppcfS11pG0yd/djiOrdxg6LmcV74LQ43 iNRmgUTCll285BRgzpCk58ZlSPIbmQ8cNVn4tpisaGornp2rcdS73p+9OIZGX2ZvilHG CX1O/5BvuarzFGwmNVLuB5m82P330+HWBjy3R13WRE8AkhVZv98iMnmzBtHHIVQBWntt R5v7d40VQEpwAYOA0zyA5q0i3JeYa8pp7ADxWdPbKj37wLJvlWEcUWaIWDXw2VJbAbyZ r7Yw== X-Gm-Message-State: AFqh2krastI2MOA6s9s8v/T0Q+F+Z2ct3aoJ+ZTILhzC4PIEAIu7tQc0 GYWvRYqfTprivC/5AdMGTU53NByDuiM= X-Google-Smtp-Source: AMrXdXumyqHyI3MpbxM7/YMWH0vB5zdmdzoDJKmoNnkG8xWrKAsz3MCRghi14yQ2HXxxeNRWAuSf8w== X-Received: by 2002:adf:dd84:0:b0:2be:4fbe:42d5 with SMTP id x4-20020adfdd84000000b002be4fbe42d5mr6065521wrl.5.1674266130711; Fri, 20 Jan 2023 17:55:30 -0800 (PST) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id f16-20020a5d50d0000000b002755e301eeasm19164432wrt.100.2023.01.20.17.55.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Jan 2023 17:55:30 -0800 (PST) Message-Id: In-Reply-To: References: Date: Sat, 21 Jan 2023 01:55:22 +0000 Subject: [PATCH v3 3/7] rebase: remove --allow-empty-message from incompatible opts Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: Derrick Stolee , Elijah Newren , Eric Sunshine , Martin =?utf-8?b?w4VncmVu?= , Phillip Wood , Elijah Newren , Elijah Newren Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Elijah Newren From: Elijah Newren --allow-empty-message was turned into a no-op and even documented as such; the flag is simply ignored. Since the flag is ignored, it shouldn't be documented as being incompatible with other flags. Signed-off-by: Elijah Newren --- Documentation/git-rebase.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt index 00d21d7287d..3929535c0cd 100644 --- a/Documentation/git-rebase.txt +++ b/Documentation/git-rebase.txt @@ -640,7 +640,6 @@ are incompatible with the following options: * --merge * --strategy * --strategy-option - * --allow-empty-message * --[no-]autosquash * --rebase-merges * --interactive From patchwork Sat Jan 21 01:55:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Elijah Newren X-Patchwork-Id: 13110802 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1ECC1C05027 for ; Sat, 21 Jan 2023 01:55:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229694AbjAUBzo (ORCPT ); Fri, 20 Jan 2023 20:55:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41826 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229685AbjAUBzl (ORCPT ); Fri, 20 Jan 2023 20:55:41 -0500 Received: from mail-wm1-x330.google.com (mail-wm1-x330.google.com [IPv6:2a00:1450:4864:20::330]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1C09D73175 for ; Fri, 20 Jan 2023 17:55:33 -0800 (PST) Received: by mail-wm1-x330.google.com with SMTP id f12-20020a7bc8cc000000b003daf6b2f9b9so6983466wml.3 for ; Fri, 20 Jan 2023 17:55:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date:from :references:in-reply-to:message-id:from:to:cc:subject:date :message-id:reply-to; bh=jJnOxb1cLASqWG2X9iEps6E7+klucQ5hQSjiTh0I9gE=; b=nrYEhXnAr0bQt4CEVWVom530cjgB1gsIAKjCvLNodTxXxn/m5rFeLknit3joQzYSwY 6RjF14ITtKlvxp4rbyfxKXzWfe+4MrKXdjM38egIl68vvkax2lyt0NAsmP+DylSZuECe DwUQ43lSvK7dbM/cwkd1yRtcMNbuEBWmqFL3Ug2baxhbrffrr7SVU2519HhidWl55dJ8 Qheg9s9PB3jLax8a/M7Yb/a8BuexzJSGGDOiqL6BuFajIjM75hZE5f4Sfcb4eFks5E78 2HksfXtPeX1xQwZEqVjHO8hQJhI1IGoyioHKsRo4S/OsnHUE6651Kb8lu1aXpFZzdKEQ 3Apg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date:from :references:in-reply-to:message-id:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jJnOxb1cLASqWG2X9iEps6E7+klucQ5hQSjiTh0I9gE=; b=QptTcovWXHDQLc4dS4dGXmvAkWxdoAwet8bP2bQ40Jvx7rMTIKmHxUjy6i/pfrdDQ0 hUyS7O2jypa9FWFxTJo5k6n4S5WGLYkQ6v8wnMbkbk4XEoVSJKyBa1LuJNzVDsCLn6IP 5D7pi2552VYi2SbyGEdkERf+rDcToQET+RHJzY84X+IkNQCueS4PN9Lx5r3xqjHtx8V4 liazn0YeC58GbqFWGXWu5oodSlSYxGQTFhBCyXxZB1G5KhoRJxdyGY5Pbtxr/hLQ2bw+ kCStG48GE+1lDUu9j3yTeoWkDbDTtN7ad+kVbgS5uLLnZt6ZRJWq02+DctcXwZCOjvZr Q2Sw== X-Gm-Message-State: AFqh2krCJdV83x8SDMjofV07Oqj0pQTQimH1mPbVglvUJwm7G1moFdAW zTCczz54VJGKz6M9VZF8u4NpW2721Eo= X-Google-Smtp-Source: AMrXdXteOa6mgyGkJiHt/c/WL6t+8ccafM8NkePS5iRXJ3IAsIhJL3YqEMtkruyuY2d+sO0CsUkKbw== X-Received: by 2002:a1c:f317:0:b0:3d0:480b:ac53 with SMTP id q23-20020a1cf317000000b003d0480bac53mr16495946wmq.12.1674266131391; Fri, 20 Jan 2023 17:55:31 -0800 (PST) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id u25-20020a05600c00d900b003daf672a616sm3717996wmm.22.2023.01.20.17.55.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Jan 2023 17:55:31 -0800 (PST) Message-Id: In-Reply-To: References: Date: Sat, 21 Jan 2023 01:55:23 +0000 Subject: [PATCH v3 4/7] rebase: fix docs about incompatibilities with --root Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: Derrick Stolee , Elijah Newren , Eric Sunshine , Martin =?utf-8?b?w4VncmVu?= , Phillip Wood , Elijah Newren , Elijah Newren Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Elijah Newren From: Elijah Newren In commit 5dacd4abdd ("git-rebase.txt: document incompatible options", 2018-06-25), I added notes about incompatibilities between options for the apply and merge backends. Unfortunately, I inverted the condition when --root was incompatible with the apply backend. Fix the documentation, and add a testcase that verifies the documentation matches the code. While at it, the documentation for --root also tried to cover some of the backend differences between the apply and merge backends in relation to reapplying cherry picks. The information: * assumed that the apply backend was the default (it isn't anymore) * was written before --reapply-cherry-picks became an option * was written before the detailed information on backend differences All of these factors make the sentence under --root about reapplying cherry picks contradict information that is now available elsewhere in the manual, and the other references are correct. So just strike this sentence. Signed-off-by: Elijah Newren --- Documentation/git-rebase.txt | 7 ++----- t/t3422-rebase-incompatible-options.sh | 4 ++++ 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt index 3929535c0cd..3f12d242d83 100644 --- a/Documentation/git-rebase.txt +++ b/Documentation/git-rebase.txt @@ -567,10 +567,7 @@ See also INCOMPATIBLE OPTIONS below. --root:: Rebase all commits reachable from ``, instead of limiting them with an ``. This allows you to rebase - the root commit(s) on a branch. When used with `--onto`, it - will skip changes already contained in `` (instead of - ``) whereas without `--onto` it will operate on every - change. + the root commit(s) on a branch. + See also INCOMPATIBLE OPTIONS below. @@ -649,7 +646,7 @@ are incompatible with the following options: * --reapply-cherry-picks * --edit-todo * --update-refs - * --root when used in combination with --onto + * --root when used without --onto In addition, the following pairs of options are incompatible: diff --git a/t/t3422-rebase-incompatible-options.sh b/t/t3422-rebase-incompatible-options.sh index 9b9e78479f6..f86274990b0 100755 --- a/t/t3422-rebase-incompatible-options.sh +++ b/t/t3422-rebase-incompatible-options.sh @@ -65,6 +65,10 @@ test_rebase_am_only () { test_must_fail git rebase $opt --update-refs A " + test_expect_success "$opt incompatible with --root without --onto" " + git checkout B^0 && + test_must_fail git rebase $opt --root A + " } # Check options which imply --apply From patchwork Sat Jan 21 01:55:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Elijah Newren X-Patchwork-Id: 13110803 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 67B9FC38141 for ; Sat, 21 Jan 2023 01:55:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229706AbjAUBzq (ORCPT ); Fri, 20 Jan 2023 20:55:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41844 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229667AbjAUBzl (ORCPT ); Fri, 20 Jan 2023 20:55:41 -0500 Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B639A71BF3 for ; Fri, 20 Jan 2023 17:55:33 -0800 (PST) Received: by mail-wm1-x336.google.com with SMTP id m15so5317003wms.4 for ; Fri, 20 Jan 2023 17:55:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date:from :references:in-reply-to:message-id:from:to:cc:subject:date :message-id:reply-to; bh=ClNPjRAf26eSVe0VCv+WyY36E4T/Isg99sFUT82jjsc=; b=deZ+H8ZoO1z98bcnjuhCqcuv0lpI7aUnVRlDPcK5ApIG+QwR6cfNoGbqVElsgrhW2S Wq5M8yZJ3cta8dMguonzIdlzoXRab3X1Jw8wSHox1IWLRz6qm7ZNpZjKWmUkMo/Ty0u2 Rc20IKOWEqRPdjV5sxKjCv7u2w+XEVBL++cQmwdcroNXY1SUACIoEhg/OdW988U7RdLz xCnx2BCgFuIsPD0v07M8B97IvDYqvmNNLdkJaPaPYqbaxprDsPVgHbkSDLtfrKZAZnn4 2EgxOq/ljB8v2Qt6/8u53vZO7lCVvcu/I2xHDPanIftoE27UzYG+FxdfaoMGYbwUOIgu qvtQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date:from :references:in-reply-to:message-id:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ClNPjRAf26eSVe0VCv+WyY36E4T/Isg99sFUT82jjsc=; b=zyzshy8gWGZphyjniwkKVa2QQ9aNg0YoLJAA1T4vW1ffrI1IpnywRL8COLfXQyJK4D WvyCPBVYGPCXCYmvoav4ncST5Rpxvp9i/kBOyh/JJ7dQdYmJt0/sV6fDmsEk8HX4C//M AQAZSBrq+fqvxVMIh7RS1fbvqSqsUZ1+8jHogiAa58BFdQtVK2vF42u6RS3R1Mq9nR9N /6tKl94UTnsfN/3ELVf+os8NfKUL605kbB14M1TDrzeEtJGdsg3nZJZ4IA2Tp3HvblC7 SqCCsR7Ezn4l/w7PTmO+3Fx/RGMuzm3Sj7yxeq/y+76eb5a7zecTBYb+cVOb9LhDxQmA TSVQ== X-Gm-Message-State: AFqh2kr0NQ7/GQ1i6c9lr2PxUqn9jG3L2Vz5p97a/3wwuR5sa2EmfEMT msD6P65u2ZRMAgd0Oxpoy6fg71jcwps= X-Google-Smtp-Source: AMrXdXsdDZ/Q6DPW3hqvcbpuRW7KG/bo7rPgDw6hm91L9G2XyDy7WTH/7TY2LfkwR7oFd6wSnWhFzA== X-Received: by 2002:a05:600c:3b91:b0:3d3:5c9e:6b27 with SMTP id n17-20020a05600c3b9100b003d35c9e6b27mr12633648wms.12.1674266132054; Fri, 20 Jan 2023 17:55:32 -0800 (PST) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id ba29-20020a0560001c1d00b002b065272da2sm16231936wrb.13.2023.01.20.17.55.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Jan 2023 17:55:31 -0800 (PST) Message-Id: <48c40c0dda00eeb8b9bdc5ba9372b46964eea14a.1674266126.git.gitgitgadget@gmail.com> In-Reply-To: References: Date: Sat, 21 Jan 2023 01:55:24 +0000 Subject: [PATCH v3 5/7] rebase: add coverage of other incompatible options Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: Derrick Stolee , Elijah Newren , Eric Sunshine , Martin =?utf-8?b?w4VncmVu?= , Phillip Wood , Elijah Newren , Elijah Newren Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Elijah Newren From: Elijah Newren The git-rebase manual noted several sets of incompatible options, but we were missing tests for a few of these. Further, we were missing code checks for some of these, which could result in command line options being silently ignored. Signed-off-by: Elijah Newren --- builtin/rebase.c | 21 ++++++++++++++------- t/t3422-rebase-incompatible-options.sh | 20 ++++++++++++++++++++ 2 files changed, 34 insertions(+), 7 deletions(-) diff --git a/builtin/rebase.c b/builtin/rebase.c index 2a5e0e8a7a0..6dcdb59bb02 100644 --- a/builtin/rebase.c +++ b/builtin/rebase.c @@ -1238,6 +1238,17 @@ int cmd_rebase(int argc, const char **argv, const char *prefix) if (options.fork_point < 0) options.fork_point = 0; } + /* + * reapply_cherry_picks is slightly weird. It starts out with a + * value of -1. It will be assigned a value of keep_base below and + * then handled specially. The apply backend is hardcoded to + * behave like reapply_cherry_picks==1, so if it has that value, we + * can just ignore the flag with the apply backend. Thus, we only + * really need to throw an error and require the merge backend if + * reapply_cherry_picks==0. + */ + if (options.reapply_cherry_picks == 0) + imply_merge(&options, "--no-reapply-cherry-picks"); /* * --keep-base defaults to --reapply-cherry-picks to avoid losing * commits when using this option. @@ -1420,13 +1431,6 @@ int cmd_rebase(int argc, const char **argv, const char *prefix) if (options.empty != EMPTY_UNSPECIFIED) imply_merge(&options, "--empty"); - /* - * --keep-base implements --reapply-cherry-picks by altering upstream so - * it works with both backends. - */ - if (options.reapply_cherry_picks && !keep_base) - imply_merge(&options, "--reapply-cherry-picks"); - if (gpg_sign) options.gpg_sign_opt = xstrfmt("-S%s", gpg_sign); @@ -1525,6 +1529,9 @@ int cmd_rebase(int argc, const char **argv, const char *prefix) if (options.update_refs) imply_merge(&options, "--update-refs"); + if (options.autosquash) + imply_merge(&options, "--autosquash"); + if (options.type == REBASE_UNSPECIFIED) { if (!strcmp(options.default_backend, "merge")) imply_merge(&options, "--merge"); diff --git a/t/t3422-rebase-incompatible-options.sh b/t/t3422-rebase-incompatible-options.sh index f86274990b0..c830025470f 100755 --- a/t/t3422-rebase-incompatible-options.sh +++ b/t/t3422-rebase-incompatible-options.sh @@ -50,6 +50,11 @@ test_rebase_am_only () { test_must_fail git rebase $opt --strategy-option=ours A " + test_expect_success "$opt incompatible with --autosquash" " + git checkout B^0 && + test_must_fail git rebase $opt --autosquash A + " + test_expect_success "$opt incompatible with --interactive" " git checkout B^0 && test_must_fail git rebase $opt --interactive A @@ -60,6 +65,21 @@ test_rebase_am_only () { test_must_fail git rebase $opt --exec 'true' A " + test_expect_success "$opt incompatible with --keep-empty" " + git checkout B^0 && + test_must_fail git rebase $opt --keep-empty A + " + + test_expect_success "$opt incompatible with --empty=..." " + git checkout B^0 && + test_must_fail git rebase $opt --empty=ask A + " + + test_expect_success "$opt incompatible with --no-reapply-cherry-picks" " + git checkout B^0 && + test_must_fail git rebase $opt --no-reapply-cherry-picks A + " + test_expect_success "$opt incompatible with --update-refs" " git checkout B^0 && test_must_fail git rebase $opt --update-refs A From patchwork Sat Jan 21 01:55:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Elijah Newren X-Patchwork-Id: 13110804 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 87AABC27C76 for ; Sat, 21 Jan 2023 01:55:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229722AbjAUBzr (ORCPT ); Fri, 20 Jan 2023 20:55:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41866 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229693AbjAUBzl (ORCPT ); Fri, 20 Jan 2023 20:55:41 -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 6E43F80BA1 for ; Fri, 20 Jan 2023 17:55:34 -0800 (PST) Received: by mail-wm1-x32e.google.com with SMTP id c10-20020a05600c0a4a00b003db0636ff84so4909469wmq.0 for ; Fri, 20 Jan 2023 17:55:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date:from :references:in-reply-to:message-id:from:to:cc:subject:date :message-id:reply-to; bh=iU/zm+ehbTRPkGabk6P07mnqrKUVBXehfmYvbw2TnME=; b=X5ZyU1e7iYQqFrOCrfVDvrstlj4u+Ko+N+g8h2Gdp/Ohhylq93TQJvp0PeHHPDW2BA aSEAVWwJ4jYHbQszCtgeHIEohf4WYDF83vUZ0qH2SwZsE5wgibxMNCFNQb1YGprwKkUj lWJisnpye/my0Fsef8r40DPWUyEC6t8P8yqDKEI3CPQC/s/rxt0MCBBPFqHPNDnq7vBq g5oteyB7YdpkV7MQT8/IQa+lQnsruoYka/JNlK4beP6PihrLgmZo35jjx1lzWt2SZWJz 09QVN4AkOGUU9YLK3/LkYGh6N4jlYf21o51ZciURJJ47Yy3bj9lJ2xo3bT1QdcYojN3F NLxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date:from :references:in-reply-to:message-id:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=iU/zm+ehbTRPkGabk6P07mnqrKUVBXehfmYvbw2TnME=; b=3TS1X0p6vGgbNeD7Fayfz+Ohb1LdRDEvwUs9JapEfNOgLzcF95SZzeKxi45gXsH0o5 rf0eoUgfnfq4vvr3txhXnOvMeo8kTj7NaVwNtFGUC5cYWzg2IKhhRqydzzrOxKXC1oLa +0o9XKgS+S6VJOKKv3/0MmdcyyZ8MHA8pooElNzzE0Wt3Ia49ZeS+n7wPyZHWoMf5zwD UTX47X/EOQ7OHiP/bbTIesq+beUnyb8dIjOP+R83Cf9JPdwq7HYoFm6q9kR7OvhQxYe1 Pp8Xt6TrVCKSAixWTIheBHNiUE+ga0q1miCVuMGQboXkiaM8ktX3PHHFUuNF5U/CUmx3 Y6NQ== X-Gm-Message-State: AFqh2korB5zXAxxDCORvsajJt6MUu0VG1ylc6NOCapSQ2whuTezb4g12 HbKNWpOsHV8ukPlltsVguK8s/5NIZXA= X-Google-Smtp-Source: AMrXdXsJZkPRscTLXHOAB5Fb/7s/ghhYX1gQaKANR+C8cyeP0jqJH9j6xzJxMjcDUPu63+ilHN2UWQ== X-Received: by 2002:a05:600c:35d4:b0:3db:3694:b93c with SMTP id r20-20020a05600c35d400b003db3694b93cmr3315946wmq.15.1674266132756; Fri, 20 Jan 2023 17:55:32 -0800 (PST) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id o6-20020a05600c378600b003d9fba3c7a4sm3780797wmr.16.2023.01.20.17.55.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Jan 2023 17:55:32 -0800 (PST) Message-Id: <8664cce6cf7f42850176d852b5f866bf70e6ce07.1674266126.git.gitgitgadget@gmail.com> In-Reply-To: References: Date: Sat, 21 Jan 2023 01:55:25 +0000 Subject: [PATCH v3 6/7] rebase: clarify the OPT_CMDMODE incompatibilities Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: Derrick Stolee , Elijah Newren , Eric Sunshine , Martin =?utf-8?b?w4VncmVu?= , Phillip Wood , Elijah Newren , Elijah Newren Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Elijah Newren From: Elijah Newren --edit-todo was documented as being incompatible with any of the options for the apply backend. However, it is also incompatible with any of the options for the merge backend, and is incompatible with any options that are not backend specific as well. The same can be said for --continue, --skip, --abort, --quit, etc. This is already somewhat implicitly covered by the synopsis, but since "[]" in the first two variants are vague it might be easy to miss this. That might not be a big deal, but since the rebase manpage has to spend so much verbiage about incompatibility of options, making a separate section for these options that are incompatible with everything else seems clearer. Do that, and remove the needless inclusion of --edit-todo in the explicit incompatibility list. Signed-off-by: Elijah Newren --- Documentation/git-rebase.txt | 61 +++++++++++++++++++----------------- 1 file changed, 33 insertions(+), 28 deletions(-) diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt index 3f12d242d83..00a9e22bc32 100644 --- a/Documentation/git-rebase.txt +++ b/Documentation/git-rebase.txt @@ -201,6 +201,39 @@ Alternatively, you can undo the 'git rebase' with git rebase --abort +MODE OPTIONS +------------ + +The options in this section cannot be used with any other option, +including not with each other: + +--continue:: + Restart the rebasing process after having resolved a merge conflict. + +--skip:: + Restart the rebasing process by skipping the current patch. + +--abort:: + Abort the rebase operation and reset HEAD to the original + branch. If `` was provided when the rebase operation was + started, then `HEAD` will be reset to ``. Otherwise `HEAD` + will be reset to where it was when the rebase operation was + started. + +--quit:: + Abort the rebase operation but `HEAD` is not reset back to the + original branch. The index and working tree are also left + unchanged as a result. If a temporary stash entry was created + using `--autostash`, it will be saved to the stash list. + +--edit-todo:: + Edit the todo list during an interactive rebase. + +--show-current-patch:: + Show the current patch in an interactive rebase or when rebase + is stopped because of conflicts. This is the equivalent of + `git show REBASE_HEAD`. + OPTIONS ------- --onto :: @@ -242,22 +275,6 @@ See also INCOMPATIBLE OPTIONS below. :: Working branch; defaults to `HEAD`. ---continue:: - Restart the rebasing process after having resolved a merge conflict. - ---abort:: - Abort the rebase operation and reset HEAD to the original - branch. If `` was provided when the rebase operation was - started, then `HEAD` will be reset to ``. Otherwise `HEAD` - will be reset to where it was when the rebase operation was - started. - ---quit:: - Abort the rebase operation but `HEAD` is not reset back to the - original branch. The index and working tree are also left - unchanged as a result. If a temporary stash entry was created - using `--autostash`, it will be saved to the stash list. - --apply:: Use applying strategies to rebase (calling `git-am` internally). This option may become a no-op in the future @@ -338,17 +355,6 @@ See also INCOMPATIBLE OPTIONS below. + See also INCOMPATIBLE OPTIONS below. ---skip:: - Restart the rebasing process by skipping the current patch. - ---edit-todo:: - Edit the todo list during an interactive rebase. - ---show-current-patch:: - Show the current patch in an interactive rebase or when rebase - is stopped because of conflicts. This is the equivalent of - `git show REBASE_HEAD`. - -m:: --merge:: Using merging strategies to rebase (default). @@ -644,7 +650,6 @@ are incompatible with the following options: * --no-keep-empty * --empty= * --reapply-cherry-picks - * --edit-todo * --update-refs * --root when used without --onto From patchwork Sat Jan 21 01:55:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Elijah Newren X-Patchwork-Id: 13110805 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DB105C05027 for ; Sat, 21 Jan 2023 01:55:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229636AbjAUBzt (ORCPT ); Fri, 20 Jan 2023 20:55:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41822 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229379AbjAUBzm (ORCPT ); Fri, 20 Jan 2023 20:55:42 -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 11CB580BB0 for ; Fri, 20 Jan 2023 17:55:35 -0800 (PST) Received: by mail-wm1-x32e.google.com with SMTP id q8so5304329wmo.5 for ; Fri, 20 Jan 2023 17:55:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date:from :references:in-reply-to:message-id:from:to:cc:subject:date :message-id:reply-to; bh=gK2s93dygSJMI2nZj+qpmrYr/09wCvz66gnVFtBFYN4=; b=KJAmkEQ299MXlg0KfqbxwHXMZ/tqAVlDLMM8YsN26LJYfjlDDO+2mvCRvHtCk5xuSa vPCv2lHggwgTU3WytS+E0m7xJqO8hPOQ96sIYIM95fTpoJKSAFzrcud5/mJDQekTuQnM ivtQ1w8dGIet1U25n/jf+OJFzucxAv/txG27SfOBdbx3TsPiclT+S+xPBqlLdiSjk5P3 /g0cbzU/kFBWUXmTRbS4/FH43ffNSx1agG+bMdcGxluuVXEKNuw2td4B/NQ8Zog62MUP DhJutLRM2SOtK3P+eSS/0zzR2PKhwaPm7UZGB5Y3DAykolhwULwsfsoKieS0CnCVHsJB 0fWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date:from :references:in-reply-to:message-id:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=gK2s93dygSJMI2nZj+qpmrYr/09wCvz66gnVFtBFYN4=; b=qEhr6xwDwVDXEX9im4LuhXUBzWbo8Lh0wYobUjDF+jeKNeD+MoIFgzGdE7T35Lwdqb cSMKhGqECJlCE+pdloRQ847c5Qkb7GU+xB62o77TUPM2KEt/vDsHXI2ibvTv/Ma4tRL8 x2FiUnvEC0VnyQaCW5soWiLcwLm4JL6gWUdSw633Mhdg9HrW3lSiNPK4VV+c2F3nZTX6 ZWr53d0h0a8q/bsUu26LGF4vOl2gjhBKEV3hh93hCYGONG1c1j6EkyToa3vWCGeKBz6i lAiAErFDpJc9fFqld3Uz9bVVpAC3kjmZnqZNasigrCA0wnfTusFrhfMK9eHIU1kR37wI ukIA== X-Gm-Message-State: AFqh2kp3UVUI/yLgjXbUmV55GQCttEQ5gVA/bpj1iFceXa8l7QYFGH2e 9qesYJbPvXO2oO3a4p7pYr98EWSmO0Y= X-Google-Smtp-Source: AMrXdXulKtDpppV6yEMQP0HBOwRbA8x5sNY0tgfo+AiY0/55vlyJBGYcGYuMCHAU4R9xa9UuOcKxpw== X-Received: by 2002:a1c:4b19:0:b0:3da:fb5c:8754 with SMTP id y25-20020a1c4b19000000b003dafb5c8754mr12588858wma.2.1674266133411; Fri, 20 Jan 2023 17:55:33 -0800 (PST) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id q16-20020adff950000000b002bcaa47bf78sm27585106wrr.26.2023.01.20.17.55.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Jan 2023 17:55:33 -0800 (PST) Message-Id: <0e8b06163f2b21748a19f32d515aecb16cd4574b.1674266126.git.gitgitgadget@gmail.com> In-Reply-To: References: Date: Sat, 21 Jan 2023 01:55:26 +0000 Subject: [PATCH v3 7/7] rebase: fix formatting of rebase --reapply-cherry-picks option in docs Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: Derrick Stolee , Elijah Newren , Eric Sunshine , Martin =?utf-8?b?w4VncmVu?= , Phillip Wood , Elijah Newren , Elijah Newren Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Elijah Newren From: Elijah Newren Commit ce5238a690 ("rebase --keep-base: imply --reapply-cherry-picks", 2022-10-17) accidentally added some blank lines that cause extra paragraphs about --reapply-cherry-picks to be considered not part of the documentation of that option. Remove the blank lines to make it clear we are still discussing --reapply-cherry-picks. Signed-off-by: Elijah Newren --- Documentation/git-rebase.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt index 00a9e22bc32..140c984d0ea 100644 --- a/Documentation/git-rebase.txt +++ b/Documentation/git-rebase.txt @@ -331,7 +331,6 @@ See also INCOMPATIBLE OPTIONS below. upstream changes, the behavior towards them is controlled by the `--empty` flag.) + - In the absence of `--keep-base` (or if `--no-reapply-cherry-picks` is given), these commits will be automatically dropped. Because this necessitates reading all upstream commits, this can be expensive in @@ -340,7 +339,6 @@ read. When using the 'merge' backend, warnings will be issued for each dropped commit (unless `--quiet` is given). Advice will also be issued unless `advice.skippedCherryPicks` is set to false (see linkgit:git-config[1]). - + `--reapply-cherry-picks` allows rebase to forgo reading all upstream commits, potentially improving performance.