From 10cdb9f38adaa16aad64403bc931405564523985 Mon Sep 17 00:00:00 2001 From: Elijah Newren Date: Sat, 15 Feb 2020 21:36:41 +0000 Subject: rebase: rename the two primary rebase backends 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 Signed-off-by: Junio C Hamano diff --git a/Documentation/config/rebase.txt b/Documentation/config/rebase.txt index e6ae30c..7f7a07d 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 fbac1cf..8c1f4b8 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=