Skip to content

Commit 0c47e06

Browse files
Denton-Lgitster
authored andcommitted
t3400: demonstrate failure with format.useAutoBase
Ever since bb52995 (format-patch: introduce format.useAutoBase configuration, 2016-04-26), `git rebase` has been broken when `format.useAutoBase = true`. It fails when rebasing a branch: fatal: failed to get upstream, if you want to record base commit automatically, please use git branch --set-upstream-to to track a remote branch. Or you could specify base commit by --base=<base-commit-id> manually error: git encountered an error while preparing the patches to replay these revisions: ede2467cdedc63784887b587a61c36b7850ebfac..d8f581194799ae29bf5fa72a98cbae98a1198b12 As a result, git cannot rebase them. Demonstrate that failure here. Reported-by: Christian Biesinger <[email protected]> Signed-off-by: Denton Liu <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 228f531 commit 0c47e06

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

t/t3400-rebase.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,12 @@ test_expect_success 'fail when upstream arg is missing and not configured' '
159159
test_must_fail git rebase
160160
'
161161

162+
test_expect_failure 'rebase works with format.useAutoBase' '
163+
test_config format.useAutoBase true &&
164+
git checkout topic &&
165+
git rebase master
166+
'
167+
162168
test_expect_success 'default to common base in @{upstream}s reflog if no upstream arg' '
163169
git checkout -b default-base master &&
164170
git checkout -b default topic &&

0 commit comments

Comments
 (0)