зеркало из https://github.com/microsoft/git.git
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>
This commit is contained in:
Родитель
441c4a4017
Коммит
619e360428
|
@ -14,7 +14,7 @@ git-rebase --continue | --abort | --skip | --edit-todo
|
||||||
Available options are
|
Available options are
|
||||||
v,verbose! display a diffstat of what changed upstream
|
v,verbose! display a diffstat of what changed upstream
|
||||||
q,quiet! be quiet. implies --no-stat
|
q,quiet! be quiet. implies --no-stat
|
||||||
autostash! automatically stash/stash pop before and after
|
autostash automatically stash/stash pop before and after
|
||||||
fork-point use 'merge-base --fork-point' to refine upstream
|
fork-point use 'merge-base --fork-point' to refine upstream
|
||||||
onto=! rebase onto given branch instead of upstream
|
onto=! rebase onto given branch instead of upstream
|
||||||
p,preserve-merges! try to recreate merges instead of ignoring them
|
p,preserve-merges! try to recreate merges instead of ignoring them
|
||||||
|
@ -292,6 +292,9 @@ do
|
||||||
--autostash)
|
--autostash)
|
||||||
autostash=true
|
autostash=true
|
||||||
;;
|
;;
|
||||||
|
--no-autostash)
|
||||||
|
autostash=false
|
||||||
|
;;
|
||||||
--verbose)
|
--verbose)
|
||||||
verbose=t
|
verbose=t
|
||||||
diffstat=t
|
diffstat=t
|
||||||
|
|
|
@ -37,6 +37,16 @@ testrebase() {
|
||||||
type=$1
|
type=$1
|
||||||
dotest=$2
|
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_expect_success "rebase$type: dirty worktree, non-conflicting rebase" '
|
||||||
test_config rebase.autostash true &&
|
test_config rebase.autostash true &&
|
||||||
git reset --hard &&
|
git reset --hard &&
|
||||||
|
|
Загрузка…
Ссылка в новой задаче