summaryrefslogtreecommitdiff
path: root/t/t3400-rebase.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t3400-rebase.sh')
-rwxr-xr-xt/t3400-rebase.sh16
1 files changed, 13 insertions, 3 deletions
diff --git a/t/t3400-rebase.sh b/t/t3400-rebase.sh
index ebf93b0695..6d94b1fcd9 100755
--- a/t/t3400-rebase.sh
+++ b/t/t3400-rebase.sh
@@ -134,12 +134,22 @@ test_expect_success 'fail when upstream arg is missing and not configured' '
test_must_fail git rebase
'
-test_expect_success 'default to @{upstream} when upstream arg is missing' '
+test_expect_success 'default to common base in @{upstream}s reflog if no upstream arg' '
+ git checkout -b default-base master &&
git checkout -b default topic &&
git config branch.default.remote . &&
- git config branch.default.merge refs/heads/master &&
+ git config branch.default.merge refs/heads/default-base &&
git rebase &&
- test "$(git rev-parse default~1)" = "$(git rev-parse master)"
+ 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 rev-parse --verify default-base >expect &&
+ git rev-parse default~1 >actual &&
+ test_cmp expect actual
'
test_expect_success 'rebase -q is quiet' '