summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Cornellà <marc@mcornella.com>2024-08-18 11:22:30 +0200
committerMarc Cornellà <marc@mcornella.com>2024-08-18 11:22:30 +0200
commit2056aeeeaddd977eb205619c6f236b94dac896be (patch)
tree5870fbd6f5329248e40295f04181cc7080ec5136
parentb0204f78394d84771436a7717aafee6cad140319 (diff)
downloadzsh-2056aeeeaddd977eb205619c6f236b94dac896be.tar.gz
zsh-2056aeeeaddd977eb205619c6f236b94dac896be.tar.bz2
zsh-2056aeeeaddd977eb205619c6f236b94dac896be.zip
Revert "feat(git)!: ask for confirmation in `gpf` alias (#10169)"
This reverts commit c13795d4c40fe075ec8b4450bb78b65ecf8108b2.
-rw-r--r--plugins/git/README.md8
-rw-r--r--plugins/git/git.plugin.zsh9
2 files changed, 6 insertions, 11 deletions
diff --git a/plugins/git/README.md b/plugins/git/README.md
index d3a927f23..e03f204f7 100644
--- a/plugins/git/README.md
+++ b/plugins/git/README.md
@@ -89,7 +89,7 @@ plugins=(... git)
| `gdnolock` | `git diff $@ ":(exclude)package-lock.json" ":(exclude)\*.lock"` |
| `gdt` | `git diff-tree --no-commit-id --name-only -r` |
| `gf` | `git fetch` |
-| `gfa` | `git fetch --all --tags --prune` |
+| `gfa` | `git fetch --all --tags --prune` |
| `gfo` | `git fetch origin` |
| `gg` | `git gui citool` |
| `gga` | `git gui citool --amend` |
@@ -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` |
diff --git a/plugins/git/git.plugin.zsh b/plugins/git/git.plugin.zsh
index 8436fb440..28d5cb314 100644
--- a/plugins/git/git.plugin.zsh
+++ b/plugins/git/git.plugin.zsh
@@ -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)"