summaryrefslogtreecommitdiff
path: root/t/t3400-rebase.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t3400-rebase.sh')
-rwxr-xr-xt/t3400-rebase.sh40
1 files changed, 32 insertions, 8 deletions
diff --git a/t/t3400-rebase.sh b/t/t3400-rebase.sh
index 221b35f..7c7e085 100755
--- a/t/t3400-rebase.sh
+++ b/t/t3400-rebase.sh
@@ -165,19 +165,37 @@ test_expect_success 'rebase works with format.useAutoBase' '
git rebase master
'
-test_expect_success 'default to common base in @{upstream}s reflog if no upstream arg' '
+test_expect_success 'default to common base in @{upstream}s reflog if no upstream arg (--merge)' '
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 &&
+ git rebase --merge &&
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 &&
+ git rebase --merge &&
+ git rev-parse --verify default-base >expect &&
+ git rev-parse default~1 >actual &&
+ test_cmp expect actual
+'
+
+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 --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 --apply &&
git rev-parse --verify default-base >expect &&
git rev-parse default~1 >actual &&
test_cmp expect actual
@@ -206,9 +224,15 @@ test_expect_success 'cherry-picked commits and fork-point work together' '
test_cmp expect D
'
-test_expect_success 'rebase -q is quiet' '
+test_expect_success 'rebase --apply -q is quiet' '
git checkout -b quiet topic &&
- git rebase -q master >output.out 2>&1 &&
+ git rebase --apply -q master >output.out 2>&1 &&
+ test_must_be_empty output.out
+'
+
+test_expect_success 'rebase --merge -q is quiet' '
+ git checkout -B quiet topic &&
+ git rebase --merge -q master >output.out 2>&1 &&
test_must_be_empty output.out
'
@@ -291,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 &&
@@ -301,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 -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 &&