Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2019-07-31 18:18:49 +0300
committerJunio C Hamano <gitster@pobox.com>2019-07-31 22:24:07 +0300
commite1fac531ea9f9dc710f6eeae37ea2b38dd5f9fae (patch)
tree05eb1f6f1698a4d68106a323685e2e265ff037a9 /t/t3427-rebase-subtree.sh
parenta63f990d9205d1a781aec310e44edf35e29063a2 (diff)
rebase -r: do not (re-)generate root commits with `--root` *and* `--onto`
When rebasing a complete commit history onto a given commit, it is pretty obvious that the root commits should be rebased on top of said given commit. To test this, let's kill two birds with one stone and add a test case to t3427-rebase-subtree.sh that not only demonstrates that this works, but also that `git rebase -r` works with merge strategies now. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t3427-rebase-subtree.sh')
-rwxr-xr-xt/t3427-rebase-subtree.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/t/t3427-rebase-subtree.sh b/t/t3427-rebase-subtree.sh
index 7a37235768..39e348de16 100755
--- a/t/t3427-rebase-subtree.sh
+++ b/t/t3427-rebase-subtree.sh
@@ -93,4 +93,15 @@ test_expect_success 'Rebase -Xsubtree --keep-empty --onto commit' '
verbose test "$(commit_message HEAD)" = "Empty commit"
'
+test_expect_success 'Rebase -Xsubtree --keep-empty --rebase-merges --onto commit' '
+ reset_rebase &&
+ git checkout -b rebase-merges-onto to-rebase &&
+ test_must_fail git rebase -Xsubtree=files_subtree --keep-empty --rebase-merges --onto files-master --root &&
+ : first pick results in no changes &&
+ git rebase --continue &&
+ verbose test "$(commit_message HEAD~2)" = "master4" &&
+ verbose test "$(commit_message HEAD~)" = "files_subtree/master5" &&
+ verbose test "$(commit_message HEAD)" = "Empty commit"
+'
+
test_done