From patchwork Sat Feb 15 21:36:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Arver via GitGitGadget X-Patchwork-Id: 11384149 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0D3E914E3 for ; Sat, 15 Feb 2020 21:37:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C00082086A for ; Sat, 15 Feb 2020 21:37:05 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="TbryVDZU" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727915AbgBOVhE (ORCPT ); Sat, 15 Feb 2020 16:37:04 -0500 Received: from mail-wr1-f66.google.com ([209.85.221.66]:45467 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727635AbgBOVhD (ORCPT ); Sat, 15 Feb 2020 16:37:03 -0500 Received: by mail-wr1-f66.google.com with SMTP id g3so15112243wrs.12 for ; Sat, 15 Feb 2020 13:37:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:in-reply-to:references:from:date:subject:fcc :content-transfer-encoding:mime-version:to:cc; bh=9NiOgzSTYNHSMkg2kWxt+Mlkfa6/rBg6G0MnRcDqvxU=; b=TbryVDZUNN5uoz8w+ch1Ku2bYEO9gi4/r12fsw5oPfEMkCawuanPAgBpvqnQJAwrCR OuWTufmhYNlkO3AMMrEoVG6OdDi9F021/2EZkprg3rUg/JoeKVFMySOXxetMg5oAgzwE agyRzupZjANQ0PKf6oN/7ru7CJuVnCmqtF5JZWEZxXDoxOrjF88ZKeUnbMuheUchFhw/ O7QgDW2tUhUSfpe+EP2Rfzryx9YAiCtEOL1S6+MnqDu/Umhfxoc0LYMH/DltKzPUVySJ jHBYMTK+SvEqvDhxLbHF1o9LBx1rviv3W5IuD4BhQfBcyQKLSDGgIGPMRpW1nkL5O0lq dNVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:in-reply-to:references:from:date :subject:fcc:content-transfer-encoding:mime-version:to:cc; bh=9NiOgzSTYNHSMkg2kWxt+Mlkfa6/rBg6G0MnRcDqvxU=; b=hquCTImQn0b1J58INf9THMAPwKqDtXfV9xGqrPSyLep6fIXt3vAT26P7G7bZ+Yxuut RQ+Y7gJrHagurQ3n6moRIbLEFJYjTStRnyl61w85GgMzwiexO9z5WpoPDh68Ir2sfZeA mVvHM4JuxRs0Md2+Tral+iGmRTVVs1DAVP/r3FC0RjzTD1p8T9acrL+6RltrlHm43wmy kMzZyNQPze8R6CxKa4rHgc32Qvm6aj6t8rq+U8xZC9aB+zq6dGvOJN0nHg5xEiHTiDNz cOt/fKsxHpxelB3NtUAVTzKfUiq+iUKnB0nxivy6k94kqVzyA9VUKrn6+GQguLrQbyAg SAJw== X-Gm-Message-State: APjAAAXz2xIPKIedV3ms4O5aDGnUmBnQ6QCl2xocoDxMDGWmjYIr9x6u gVtZtRKYTfOr2pHoOmURb9dTg/KQ X-Google-Smtp-Source: APXvYqwxwq360FTK9Aaf4t3ghIw25CQ1GYE3f7b8fy6udwPULpd7mOqLW7WJwG4j3QSepQBR+PsMWA== X-Received: by 2002:a05:6000:1252:: with SMTP id j18mr12393318wrx.103.1581802618552; Sat, 15 Feb 2020 13:36:58 -0800 (PST) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id q130sm14318682wme.19.2020.02.15.13.36.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 15 Feb 2020 13:36:58 -0800 (PST) Message-Id: In-Reply-To: References: From: "Elijah Newren via GitGitGadget" Date: Sat, 15 Feb 2020 21:36:41 +0000 Subject: [PATCH v5 20/20] rebase: rename the two primary rebase backends Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: Johannes.Schindelin@gmx.de, phillip.wood@dunelm.org.uk, liu.denton@gmail.com, gitster@pobox.com, plroskin@gmail.com, alban.gruin@gmail.com, szeder.dev@gmail.com, jrnieder@gmail.com, emilyshaffer@google.com, Elijah Newren , Elijah Newren Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Elijah Newren Two related changes, with separate rationale for each: Rename the 'interactive' backend to 'merge' because: * 'interactive' as a name caused confusion; this backend has been used for many kinds of non-interactive rebases, and will probably be used in the future for more non-interactive rebases than interactive ones given that we are making it the default. * 'interactive' is not the underlying strategy; merging is. * the directory where state is stored is not called .git/rebase-interactive but .git/rebase-merge. Rename the 'am' backend to 'apply' because: * Few users are familiar with git-am as a reference point. * Related to the above, the name 'am' makes sentences in the documentation harder for users to read and comprehend (they may read it as the verb from "I am"); avoiding this difficult places a large burden on anyone writing documentation about this backend to be very careful with quoting and sentence structure and often forces annoying redundancy to try to avoid such problems. * Users stumble over pronunciation ("am" as in "I am a person not a backend" or "am" as in "the first and thirteenth letters in the alphabet in order are "A-M"); this may drive confusion when one user tries to explain to another what they are doing. * While "am" is the tool driving this backend, the tool driving git-am is git-apply, and since we are driving towards lower-level tools for the naming of the merge backend we may as well do so here too. * The directory where state is stored has never been called .git/rebase-am, it was always called .git/rebase-apply. For all the reasons listed above: * Modify the documentation to refer to the backends with the new names * Provide a brief note in the documentation connecting the new names to the old names in case users run across the old names anywhere (e.g. in old release notes or older versions of the documentation) * Change the (new) --am command line flag to --apply * Rename some enums, variables, and functions to reinforce the new backend names for us as well. Signed-off-by: Elijah Newren Reported-by: Emily Shaffer Signed-off-by: Jonathan Nieder --- Documentation/config/rebase.txt | 8 +-- Documentation/git-rebase.txt | 77 +++++++++++++----------- builtin/rebase.c | 99 +++++++++++++++---------------- t/t3400-rebase.sh | 16 ++--- t/t3401-rebase-and-am-rename.sh | 4 +- t/t3404-rebase-interactive.sh | 2 +- t/t3406-rebase-message.sh | 12 ++-- t/t3407-rebase-abort.sh | 6 +- t/t3420-rebase-autostash.sh | 22 +++---- t/t3421-rebase-topology-linear.sh | 34 +++++------ t/t3424-rebase-empty.sh | 6 +- t/t3425-rebase-topology-merges.sh | 8 +-- t/t3432-rebase-fast-forward.sh | 4 +- t/t5407-post-rewrite-hook.sh | 16 ++--- t/t5520-pull.sh | 2 +- t/t6047-diff3-conflict-markers.sh | 4 +- t/t7512-status-help.sh | 12 ++-- t/t9903-bash-prompt.sh | 2 +- 18 files changed, 166 insertions(+), 168 deletions(-) diff --git a/Documentation/config/rebase.txt b/Documentation/config/rebase.txt index e6ae30c9999..7f7a07d22f8 100644 --- a/Documentation/config/rebase.txt +++ b/Documentation/config/rebase.txt @@ -7,11 +7,9 @@ rebase.useBuiltin:: rebase.backend:: Default backend to use for rebasing. Possible choices are - 'am' or 'merge' (note that the merge backend is sometimes also - refered to as the interactive backend or the interactive - machinery elsewhere in the docs). Also, in the future, if the - merge backend gains all remaining capabilities of the am - backend, this setting may become unused. + 'apply' or 'merge'. In the future, if the merge backend gains + all remaining capabilities of the apply backend, this setting + may become unused. rebase.stat:: Whether to show a diffstat of what changed upstream since the last diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt index fbac1cf38dd..8c1f4b82680 100644 --- a/Documentation/git-rebase.txt +++ b/Documentation/git-rebase.txt @@ -258,10 +258,10 @@ See also INCOMPATIBLE OPTIONS below. original branch. The index and working tree are also left unchanged as a result. ---am: - Use git-am internally to rebase. This option may become a - no-op in the future once the interactive backend handles - everything the am one does. +--apply: + Use applying strategies to rebase (calling `git-am` + internally). This option may become a no-op in the future + once the merge backend handles everything the apply one does. + See also INCOMPATIBLE OPTIONS below. @@ -385,7 +385,7 @@ See also INCOMPATIBLE OPTIONS below. Ensure at least lines of surrounding context match before and after each change. When fewer lines of surrounding context exist they all must match. By default no context is - ever ignored. Implies --am. + ever ignored. Implies --apply. + See also INCOMPATIBLE OPTIONS below. @@ -425,7 +425,7 @@ with `--keep-base` in order to drop those commits from your branch. --whitespace=