1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-12-18 10:22:00 +00:00

Revert "feat(git)!: ask for confirmation in gpf alias (#10169)"

This reverts commit c13795d4c4.
This commit is contained in:
Marc Cornellà 2024-08-18 11:22:30 +02:00
parent b0204f7839
commit 2056aeeead
2 changed files with 6 additions and 11 deletions

View file

@ -136,10 +136,8 @@ plugins=(... git)
| `gpd` | `git push --dry-run` |
| `gpf!` | `git push --force` |
| `ggf` | `git push --force origin $(current_branch)` |
| `gpf` | On Git >= 2.30: after confirmation, `git push --force-with-lease --force-if-includes` |
| `gpf` | On Git < 2.30: after confirmation, `git push --force-with-lease` |
| `gpff` | On Git >= 2.30: `git push --force-with-lease --force-if-includes` |
| `gpff` | On Git < 2.30: `git push --force-with-lease` |
| `gpf` | On Git >= 2.30: `git push --force-with-lease --force-if-includes` |
| `gpf` | On Git < 2.30: `git push --force-with-lease` |
| `ggfl` | `git push --force-with-lease origin $(current_branch)` |
| `gpsup` | `git push --set-upstream origin $(git_current_branch)` |
| `gpsupf` | On Git >= 2.30: `git push --set-upstream origin $(git_current_branch) --force-with-lease --force-if-includes` |

View file

@ -300,13 +300,10 @@ function ggf() {
}
compdef _git ggf=git-checkout
alias 'gpf!'='git push --force'
alias gpf!='git push --force'
is-at-least 2.30 "$git_version" \
&& alias gpf='read -k 1 -q "?Continue force-push? [y/N] " && echo && git push --force-with-lease --force-if-includes' \
|| alias gpf='read -k 1 -q "?Continue force-push? [y/N] " && echo && git push --force-with-lease'
is-at-least 2.30 "$git_version" \
&& alias gpff='git push --force-with-lease --force-if-includes' \
|| alias gpff='git push --force-with-lease'
&& alias gpf='git push --force-with-lease --force-if-includes' \
|| alias gpf='git push --force-with-lease'
function ggfl() {
[[ "$#" != 1 ]] && local b="$(git_current_branch)"