Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElijah Newren <newren@gmail.com>2020-02-16 00:36:41 +0300
committerJunio C Hamano <gitster@pobox.com>2020-02-17 02:40:42 +0300
commit10cdb9f38adaa16aad64403bc931405564523985 (patch)
treeecce29c2fb8ca24862f684b6252c4d22b1b41945 /t/t3406-rebase-message.sh
parent2ac0d6273fa6618e1a8783e07e2363b3abba1f2a (diff)
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 <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t3406-rebase-message.sh')
-rwxr-xr-xt/t3406-rebase-message.sh12
1 files changed, 6 insertions, 6 deletions
diff --git a/t/t3406-rebase-message.sh b/t/t3406-rebase-message.sh
index 7ce617fc1f..61b76f3301 100755
--- a/t/t3406-rebase-message.sh
+++ b/t/t3406-rebase-message.sh
@@ -23,24 +23,24 @@ test_expect_success 'rebase -m' '
'
test_expect_success 'rebase against master twice' '
- git rebase --am master >out &&
+ git rebase --apply master >out &&
test_i18ngrep "Current branch topic is up to date" out
'
test_expect_success 'rebase against master twice with --force' '
- git rebase --force-rebase --am master >out &&
+ git rebase --force-rebase --apply master >out &&
test_i18ngrep "Current branch topic is up to date, rebase forced" out
'
test_expect_success 'rebase against master twice from another branch' '
git checkout topic^ &&
- git rebase --am master topic >out &&
+ git rebase --apply master topic >out &&
test_i18ngrep "Current branch topic is up to date" out
'
test_expect_success 'rebase fast-forward to master' '
git checkout topic^ &&
- git rebase --am topic >out &&
+ git rebase --apply topic >out &&
test_i18ngrep "Fast-forwarded HEAD to topic" out
'
@@ -89,7 +89,7 @@ test_expect_success 'GIT_REFLOG_ACTION' '
git checkout -b reflog-topic start &&
test_commit reflog-to-rebase &&
- git rebase --am reflog-onto &&
+ git rebase --apply reflog-onto &&
git log -g --format=%gs -3 >actual &&
cat >expect <<-\EOF &&
rebase finished: returning to refs/heads/reflog-topic
@@ -99,7 +99,7 @@ test_expect_success 'GIT_REFLOG_ACTION' '
test_cmp expect actual &&
git checkout -b reflog-prefix reflog-to-rebase &&
- GIT_REFLOG_ACTION=change-the-reflog git rebase --am reflog-onto &&
+ GIT_REFLOG_ACTION=change-the-reflog git rebase --apply reflog-onto &&
git log -g --format=%gs -3 >actual &&
cat >expect <<-\EOF &&
rebase finished: returning to refs/heads/reflog-prefix