rebase: finish_rebase() in noop rebase
[gitweb.git] / t / t3420-rebase-autostash.sh
index 479cbb215fc90e5d5741fca830c62b8b4e8121e1..90eb26493cd309da34687dffc939166069cd88c6 100755 (executable)
@@ -141,6 +141,28 @@ 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
+'
+
+test_expect_success "rebase: noop rebase" '
+       test_config rebase.autostash true &&
+       git reset --hard &&
+       git checkout -b same-feature-branch feature-branch &&
+       test_when_finished git branch -D same-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