aboutsummaryrefslogtreecommitdiff
path: root/t/t3420-rebase-autostash.sh
diff options
context:
space:
mode:
authorRamkumar Ramachandra <artagnon@gmail.com>2013-06-13 21:36:13 +0530
committerJunio C Hamano <gitster@pobox.com>2013-06-13 15:31:06 -0700
commit96e2b99ed56c8433cc4aa03f32d2ef2a22748fc0 (patch)
tree3d3b4d30c165bfa655a900e20f1f5f25adadf8a3 /t/t3420-rebase-autostash.sh
parentaf2f0ebcbdb164043d6ad72c81c6ce5cdadf63b5 (diff)
downloadgit-96e2b99ed56c8433cc4aa03f32d2ef2a22748fc0.tar.gz
git-96e2b99ed56c8433cc4aa03f32d2ef2a22748fc0.tar.xz
rebase: finish_rebase() in noop rebase
In the following case $ git rebase master Current branch autostash-fix is up to date. 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: Ramkumar Ramachandra <artagnon@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t3420-rebase-autostash.sh')
-rwxr-xr-xt/t3420-rebase-autostash.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/t/t3420-rebase-autostash.sh b/t/t3420-rebase-autostash.sh
index 1bde00716..90eb26493 100755
--- a/t/t3420-rebase-autostash.sh
+++ b/t/t3420-rebase-autostash.sh
@@ -152,6 +152,17 @@ test_expect_success "rebase: fast-forward rebase" '
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