File tree Expand file tree Collapse file tree 3 files changed +16
-2
lines changed Expand file tree Collapse file tree 3 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -434,7 +434,8 @@ If the '--autosquash' option is enabled by default using the
434
434
configuration variable `rebase.autoSquash`, this option can be
435
435
used to override and disable this setting.
436
436
437
- --[no-]autostash::
437
+ --autostash::
438
+ --no-autostash::
438
439
Automatically create a temporary stash before the operation
439
440
begins, and apply it after the operation ends. This means
440
441
that you can run rebase on a dirty worktree. However, use
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ git-rebase --continue | --abort | --skip | --edit-todo
14
14
Available options are
15
15
v,verbose! display a diffstat of what changed upstream
16
16
q,quiet! be quiet. implies --no-stat
17
- autostash! automatically stash/stash pop before and after
17
+ autostash automatically stash/stash pop before and after
18
18
fork-point use 'merge-base --fork-point' to refine upstream
19
19
onto=! rebase onto given branch instead of upstream
20
20
p,preserve-merges! try to recreate merges instead of ignoring them
292
292
--autostash)
293
293
autostash=true
294
294
;;
295
+ --no-autostash)
296
+ autostash=false
297
+ ;;
295
298
--verbose)
296
299
verbose=t
297
300
diffstat=t
Original file line number Diff line number Diff line change @@ -37,6 +37,16 @@ testrebase() {
37
37
type=$1
38
38
dotest=$2
39
39
40
+ test_expect_success " rebase$type : dirty worktree, --no-autostash" '
41
+ test_config rebase.autostash true &&
42
+ git reset --hard &&
43
+ git checkout -b rebased-feature-branch feature-branch &&
44
+ test_when_finished git branch -D rebased-feature-branch &&
45
+ test_when_finished git checkout feature-branch &&
46
+ echo dirty >>file3 &&
47
+ test_must_fail git rebase$type --no-autostash unrelated-onto-branch
48
+ '
49
+
40
50
test_expect_success " rebase$type : dirty worktree, non-conflicting rebase" '
41
51
test_config rebase.autostash true &&
42
52
git reset --hard &&
You can’t perform that action at this time.
0 commit comments