Skip to content

Commit

Permalink
Newer autostash when rebase
Browse files Browse the repository at this point in the history
This option is disabled by defalut since it's not safe in the case when
there is no unstashed changes. It fails actual rebase process,
especially when `accept-work` is used.
  • Loading branch information
extsoft committed Jul 29, 2019
1 parent 54a6c31 commit 0dc4bd3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions docs/commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ git config --local core.autocrlf input
git config --local core.autocrlf true
# Always rebase when pull
git config --local pull.rebase true
# Always autostash if rebase
git config --local rebase.autoStash true
# Never autostash if rebase
git config --local rebase.autoStash false
# Specify an external helper to be called when a username
# or password credential is needed (MAC only)
git config --local credential.helper osxkeychain
Expand Down
2 changes: 1 addition & 1 deletion libexec/git-elegant-acquire-repository
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ _core_autocrlf_windows=("core.autocrlf" "true")
## Pull
_pull_rebase=("pull.rebase" "true")
## Rebase
_rebase_autoStash=("rebase.autoStash" "true")
_rebase_autoStash=("rebase.autoStash" "false")
## Credentials, MAC only
_credential_helper_darwin=("credential.helper" "osxkeychain")

Expand Down
6 changes: 3 additions & 3 deletions tests/git-elegant-acquire-repository.bats
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ teardown() {
[[ "${lines[@]}" =~ "== git config --local fetch.pruneTags true ==" ]]
[[ "${lines[@]}" =~ "== git config --local core.autocrlf true ==" ]]
[[ "${lines[@]}" =~ "== git config --local pull.rebase true ==" ]]
[[ "${lines[@]}" =~ "== git config --local rebase.autoStash true ==" ]]
[[ "${lines[@]}" =~ "== git config --local rebase.autoStash false ==" ]]
# negative checks are used instead of checking commands size
[[ ! "${lines[@]}" =~ "== git config --local credential.helper osxkeychain ==" ]]
[[ ! "${lines[@]}" =~ "== git config --local core.autocrlf input ==" ]]
Expand All @@ -53,7 +53,7 @@ teardown() {
[[ "${lines[@]}" =~ "== git config --local fetch.pruneTags true ==" ]]
[[ "${lines[@]}" =~ "== git config --local core.autocrlf input ==" ]]
[[ "${lines[@]}" =~ "== git config --local pull.rebase true ==" ]]
[[ "${lines[@]}" =~ "== git config --local rebase.autoStash true ==" ]]
[[ "${lines[@]}" =~ "== git config --local rebase.autoStash false ==" ]]
# negative checks are used instead of checking commands size
[[ ! "${lines[@]}" =~ "== git config --local credential.helper osxkeychain ==" ]]
[[ ! "${lines[@]}" =~ "== git config --local core.autocrlf true ==" ]]
Expand All @@ -68,7 +68,7 @@ teardown() {
[[ "${lines[@]}" =~ "== git config --local fetch.pruneTags true ==" ]]
[[ "${lines[@]}" =~ "== git config --local core.autocrlf input ==" ]]
[[ "${lines[@]}" =~ "== git config --local pull.rebase true ==" ]]
[[ "${lines[@]}" =~ "== git config --local rebase.autoStash true ==" ]]
[[ "${lines[@]}" =~ "== git config --local rebase.autoStash false ==" ]]
[[ "${lines[@]}" =~ "== git config --local credential.helper osxkeychain ==" ]]
# negative checks are used instead of checking commands size
[[ ! "${lines[@]}" =~ "== git config --local core.autocrlf true ==" ]]
Expand Down

0 comments on commit 0dc4bd3

Please sign in to comment.