提交 af2f0ebc 编写于 作者: R Ramkumar Ramachandra 提交者: Junio C Hamano

rebase: finish_rebase() in fast-forward rebase

In the following case

  $ git rebase master
  Fast-forwarded autostash-fix to master.

The autostash is not applied automatically, because this codepath
forgets to call finish_rebase().  Fix this.  Also add a test to guard
against regressions.
Signed-off-by: NRamkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 dc8ca912
......@@ -579,6 +579,7 @@ if test "$mb" = "$orig_head"
then
say "$(eval_gettext "Fast-forwarded \$branch_name to \$onto_name.")"
move_to_original_branch
finish_rebase
exit 0
fi
......
......@@ -141,6 +141,17 @@ testrebase() {
'
}
test_expect_success "rebase: fast-forward rebase" '
test_config rebase.autostash true &&
git reset --hard &&
git checkout -b behind-feature-branch feature-branch~1 &&
test_when_finished git branch -D behind-feature-branch &&
echo dirty >>file1 &&
git rebase feature-branch &&
grep dirty file1 &&
git checkout feature-branch
'
testrebase "" .git/rebase-apply
testrebase " --merge" .git/rebase-merge
testrebase " --interactive" .git/rebase-merge
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册