diff options
author | Johannes Schindelin <johannes.schindelin@gmx.de> | 2018-05-04 01:01:28 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-05-06 13:21:58 +0900 |
commit | 9c85a1c29c5ac26c94aa6eda8da9bbfbc6751785 (patch) | |
tree | b3ae3b2c5961e13d4ec7c804f14ad29e1993aa0d /t | |
parent | ebddf393964120628f60f6f5e435cde87cc209c6 (diff) | |
download | git-9c85a1c29c5ac26c94aa6eda8da9bbfbc6751785.tar.gz |
rebase --rebase-merges: a "merge" into a new root is a fast-forward
When a user provides a todo list containing something like
reset [new root]
merge my-branch
let's do the same as if pulling into an orphan branch: simply
fast-forward.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-x | t/t3430-rebase-merges.sh | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/t/t3430-rebase-merges.sh b/t/t3430-rebase-merges.sh index 35260862fc..5543f1d5a3 100755 --- a/t/t3430-rebase-merges.sh +++ b/t/t3430-rebase-merges.sh @@ -275,4 +275,17 @@ test_expect_success 'root commits' ' test_cmp_rev HEAD $before ' +test_expect_success 'a "merge" into a root commit is a fast-forward' ' + head=$(git rev-parse HEAD) && + cat >script-from-scratch <<-EOF && + reset [new root] + merge $head + EOF + test_config sequence.editor \""$PWD"/replace-editor.sh\" && + test_tick && + git rebase -i -r HEAD^ && + test_cmp_rev HEAD $head +' + + test_done |