summaryrefslogtreecommitdiff
path: root/t/t3400-rebase.sh
diff options
context:
space:
mode:
authorElijah Newren <newren@gmail.com>2020-02-15 21:36:41 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-02-16 23:40:42 (GMT)
commit10cdb9f38adaa16aad64403bc931405564523985 (patch)
treeecce29c2fb8ca24862f684b6252c4d22b1b41945 /t/t3400-rebase.sh
parent2ac0d6273fa6618e1a8783e07e2363b3abba1f2a (diff)
downloadgit-10cdb9f38adaa16aad64403bc931405564523985.zip
git-10cdb9f38adaa16aad64403bc931405564523985.tar.gz
git-10cdb9f38adaa16aad64403bc931405564523985.tar.bz2
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/t3400-rebase.sh')
-rwxr-xr-xt/t3400-rebase.sh16
1 files changed, 8 insertions, 8 deletions
diff --git a/t/t3400-rebase.sh b/t/t3400-rebase.sh
index 0a491f2..7c7e085 100755
--- a/t/t3400-rebase.sh
+++ b/t/t3400-rebase.sh
@@ -183,19 +183,19 @@ test_expect_success 'default to common base in @{upstream}s reflog if no upstrea
test_cmp expect actual
'
-test_expect_success 'default to common base in @{upstream}s reflog if no upstream arg (--am)' '
+test_expect_success 'default to common base in @{upstream}s reflog if no upstream arg (--apply)' '
git checkout -B default-base master &&
git checkout -B default topic &&
git config branch.default.remote . &&
git config branch.default.merge refs/heads/default-base &&
- git rebase --am &&
+ git rebase --apply &&
git rev-parse --verify default-base >expect &&
git rev-parse default~1 >actual &&
test_cmp expect actual &&
git checkout default-base &&
git reset --hard HEAD^ &&
git checkout default &&
- git rebase --am &&
+ git rebase --apply &&
git rev-parse --verify default-base >expect &&
git rev-parse default~1 >actual &&
test_cmp expect actual
@@ -224,9 +224,9 @@ test_expect_success 'cherry-picked commits and fork-point work together' '
test_cmp expect D
'
-test_expect_success 'rebase --am -q is quiet' '
+test_expect_success 'rebase --apply -q is quiet' '
git checkout -b quiet topic &&
- git rebase --am -q master >output.out 2>&1 &&
+ git rebase --apply -q master >output.out 2>&1 &&
test_must_be_empty output.out
'
@@ -315,7 +315,7 @@ EOF
test_cmp From_.msg out
'
-test_expect_success 'rebase --am and --show-current-patch' '
+test_expect_success 'rebase --apply and --show-current-patch' '
test_create_repo conflict-apply &&
(
cd conflict-apply &&
@@ -325,13 +325,13 @@ test_expect_success 'rebase --am and --show-current-patch' '
echo two >>init.t &&
git commit -a -m two &&
git tag two &&
- test_must_fail git rebase --am -f --onto init HEAD^ &&
+ test_must_fail git rebase --apply -f --onto init HEAD^ &&
GIT_TRACE=1 git rebase --show-current-patch >/dev/null 2>stderr &&
grep "show.*$(git rev-parse two)" stderr
)
'
-test_expect_success 'rebase --am and .gitattributes' '
+test_expect_success 'rebase --apply and .gitattributes' '
test_create_repo attributes &&
(
cd attributes &&