summaryrefslogtreecommitdiff
path: root/t/t3420-rebase-autostash.sh
diff options
context:
space:
mode:
authorJohn Keeping <john@keeping.me.uk>2015-09-10 22:30:51 (GMT)
committerJunio C Hamano <gitster@pobox.com>2015-09-11 00:42:01 (GMT)
commit619e3604288ab54c3694e99746661caf0f2df961 (patch)
treee8b9134a571a3021577a5b59480c39692d2c4f20 /t/t3420-rebase-autostash.sh
parent441c4a40173fe1ee8a5c0094e587dfc47e2a6460 (diff)
downloadgit-619e3604288ab54c3694e99746661caf0f2df961.zip
git-619e3604288ab54c3694e99746661caf0f2df961.tar.gz
git-619e3604288ab54c3694e99746661caf0f2df961.tar.bz2
rebase: support --no-autostash
This is documented as an option but we don't actually accept it. Support it so that it is possible to override the "rebase.autostash" config variable. Reported-by: Daniel Hahler <genml+git-2014@thequod.de> Signed-off-by: John Keeping <john@keeping.me.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t3420-rebase-autostash.sh')
-rwxr-xr-xt/t3420-rebase-autostash.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/t/t3420-rebase-autostash.sh b/t/t3420-rebase-autostash.sh
index d783f03..944154b 100755
--- a/t/t3420-rebase-autostash.sh
+++ b/t/t3420-rebase-autostash.sh
@@ -37,6 +37,16 @@ testrebase() {
type=$1
dotest=$2
+ test_expect_success "rebase$type: dirty worktree, --no-autostash" '
+ test_config rebase.autostash true &&
+ git reset --hard &&
+ git checkout -b rebased-feature-branch feature-branch &&
+ test_when_finished git branch -D rebased-feature-branch &&
+ test_when_finished git checkout feature-branch &&
+ echo dirty >>file3 &&
+ test_must_fail git rebase$type --no-autostash unrelated-onto-branch
+ '
+
test_expect_success "rebase$type: dirty worktree, non-conflicting rebase" '
test_config rebase.autostash true &&
git reset --hard &&