95de26572e6790ea178193580c625c9109119176

Author
Arvin Verain <arvinverain@proton.me>
Committer
GitHub <noreply@github.com>
Date

Message

revert(git): revert deprecation for `gg*` aliases (#13485)

These aliases have long been expected and integrated with user workflows. Reverting our decision to deprecate them.

Diff

 1diff --git a/plugins/git/README.md b/plugins/git/README.md
 2index bbbb28bdfd490c4b7c7d17981d3aaf4e585a0c31..0090fa6cfeb8d2e782504d06f13bfa77e1f409f4 100644
 3--- a/plugins/git/README.md
 4+++ b/plugins/git/README.md
 5@@ -239,9 +239,6 @@ receive further support.
 6 | `gap`    | `git add --patch`                                         | New alias: `gapa`                                     |
 7 | `gcl`    | `git config --list`                                       | New alias: `gcf`                                      |
 8 | `gdt`    | `git difftool`                                            | No replacement                                        |
 9-| `ggpull` | `git pull origin $(git_current_branch)`                   | New function: `ggl` (`ggpull` is now aliased to this) |
10-| `ggpur`  | `git pull --rebase origin $(git_current_branch)`          | New function: `ggu` (`ggpur` is now aliased to this)  |
11-| `ggpush` | `git push origin $(git_current_branch)`                   | New function: `ggp` (`ggpush` is now aliased to this) |
12 
13 ## Functions
14 
15diff --git a/plugins/git/git.plugin.zsh b/plugins/git/git.plugin.zsh
16index a240e1fb3101510f9c4d5f789cacf30d03ca2e06..9ef60d69acf099cbed7a68545f2af1ac2eb73097 100644
17--- a/plugins/git/git.plugin.zsh
18+++ b/plugins/git/git.plugin.zsh
19@@ -102,6 +102,7 @@ function ggpnp() {
20 }
21 compdef _git ggpnp=git-checkout
22 
23+alias ggpur='ggu'
24 alias g='git'
25 alias ga='git add'
26 alias gaa='git add --all'
27@@ -281,6 +282,7 @@ alias gprom='git pull --rebase origin $(git_main_branch)'
28 alias gpromi='git pull --rebase=interactive origin $(git_main_branch)'
29 alias gprum='git pull --rebase upstream $(git_main_branch)'
30 alias gprumi='git pull --rebase=interactive upstream $(git_main_branch)'
31+alias ggpull='git pull origin "$(git_current_branch)"'
32 
33 function ggl() {
34   if [[ $# != 0 ]] && [[ $# != 1 ]]; then
35@@ -324,6 +326,7 @@ is-at-least 2.30 "$git_version" \
36 alias gpv='git push --verbose'
37 alias gpoat='git push origin --all && git push origin --tags'
38 alias gpod='git push origin --delete'
39+alias ggpush='git push origin "$(git_current_branch)"'
40 
41 function ggp() {
42   if [[ $# != 0 ]] && [[ $# != 1 ]]; then
43@@ -420,9 +423,6 @@ unset git_version
44 local old_name new_name
45 for old_name new_name (
46   current_branch  git_current_branch
47-  ggpull          ggl
48-  ggpur           ggu
49-  ggpush          ggp
50 ); do
51   aliases[$old_name]="
52     print -Pu2 \"%F{yellow}[oh-my-zsh] '%F{red}${old_name}%F{yellow}' is deprecated, using '%F{green}${new_name}%F{yellow}' instead.%f\"