2056aeeeaddd977eb205619c6f236b94dac896be
- Author
- Marc Cornellà <marc@mcornella.com>
- Committer
- Marc Cornellà <marc@mcornella.com>
- Date
Message
Revert "feat(git)!: ask for confirmation in `gpf` alias (#10169)"
This reverts commit c13795d4c40fe075ec8b4450bb78b65ecf8108b2.
Diff
1diff --git a/plugins/git/README.md b/plugins/git/README.md
2index d3a927f233fedd08c5c3a552220c37904487784c..e03f204f70bcf7a5c93932e6bcfbd1af47b11c4b 100644
3--- a/plugins/git/README.md
4+++ b/plugins/git/README.md
5@@ -89,7 +89,7 @@ plugins=(... git)
6 | `gdnolock` | `git diff $@ ":(exclude)package-lock.json" ":(exclude)\*.lock"` |
7 | `gdt` | `git diff-tree --no-commit-id --name-only -r` |
8 | `gf` | `git fetch` |
9-| `gfa` | `git fetch --all --tags --prune` |
10+| `gfa` | `git fetch --all --tags --prune` |
11 | `gfo` | `git fetch origin` |
12 | `gg` | `git gui citool` |
13 | `gga` | `git gui citool --amend` |
14@@ -136,10 +136,8 @@ plugins=(... git)
15 | `gpd` | `git push --dry-run` |
16 | `gpf!` | `git push --force` |
17 | `ggf` | `git push --force origin $(current_branch)` |
18-| `gpf` | On Git >= 2.30: after confirmation, `git push --force-with-lease --force-if-includes` |
19-| `gpf` | On Git < 2.30: after confirmation, `git push --force-with-lease` |
20-| `gpff` | On Git >= 2.30: `git push --force-with-lease --force-if-includes` |
21-| `gpff` | On Git < 2.30: `git push --force-with-lease` |
22+| `gpf` | On Git >= 2.30: `git push --force-with-lease --force-if-includes` |
23+| `gpf` | On Git < 2.30: `git push --force-with-lease` |
24 | `ggfl` | `git push --force-with-lease origin $(current_branch)` |
25 | `gpsup` | `git push --set-upstream origin $(git_current_branch)` |
26 | `gpsupf` | On Git >= 2.30: `git push --set-upstream origin $(git_current_branch) --force-with-lease --force-if-includes` |
27diff --git a/plugins/git/git.plugin.zsh b/plugins/git/git.plugin.zsh
28index 8436fb4403c36f4dec87dbf8090b89123a5fd02d..28d5cb3142321a8962c4167ed8aef8f76b562889 100644
29--- a/plugins/git/git.plugin.zsh
30+++ b/plugins/git/git.plugin.zsh
31@@ -300,13 +300,10 @@ function ggf() {
32 }
33 compdef _git ggf=git-checkout
34
35-alias 'gpf!'='git push --force'
36+alias gpf!='git push --force'
37 is-at-least 2.30 "$git_version" \
38- && alias gpf='read -k 1 -q "?Continue force-push? [y/N] " && echo && git push --force-with-lease --force-if-includes' \
39- || alias gpf='read -k 1 -q "?Continue force-push? [y/N] " && echo && git push --force-with-lease'
40-is-at-least 2.30 "$git_version" \
41- && alias gpff='git push --force-with-lease --force-if-includes' \
42- || alias gpff='git push --force-with-lease'
43+ && alias gpf='git push --force-with-lease --force-if-includes' \
44+ || alias gpf='git push --force-with-lease'
45
46 function ggfl() {
47 [[ "$#" != 1 ]] && local b="$(git_current_branch)"