1
0
mirror of https://github.com/robbyrussell/oh-my-zsh.git synced 2025-12-20 06:03:35 +01:00

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.
This commit is contained in:
Arvin Verain
2025-12-19 17:05:49 +08:00
committed by GitHub
parent 945d89f7ae
commit 95de26572e
2 changed files with 3 additions and 6 deletions

View File

@@ -239,9 +239,6 @@ receive further support.
| `gap` | `git add --patch` | New alias: `gapa` | | `gap` | `git add --patch` | New alias: `gapa` |
| `gcl` | `git config --list` | New alias: `gcf` | | `gcl` | `git config --list` | New alias: `gcf` |
| `gdt` | `git difftool` | No replacement | | `gdt` | `git difftool` | No replacement |
| `ggpull` | `git pull origin $(git_current_branch)` | New function: `ggl` (`ggpull` is now aliased to this) |
| `ggpur` | `git pull --rebase origin $(git_current_branch)` | New function: `ggu` (`ggpur` is now aliased to this) |
| `ggpush` | `git push origin $(git_current_branch)` | New function: `ggp` (`ggpush` is now aliased to this) |
## Functions ## Functions

View File

@@ -102,6 +102,7 @@ function ggpnp() {
} }
compdef _git ggpnp=git-checkout compdef _git ggpnp=git-checkout
alias ggpur='ggu'
alias g='git' alias g='git'
alias ga='git add' alias ga='git add'
alias gaa='git add --all' alias gaa='git add --all'
@@ -281,6 +282,7 @@ alias gprom='git pull --rebase origin $(git_main_branch)'
alias gpromi='git pull --rebase=interactive origin $(git_main_branch)' alias gpromi='git pull --rebase=interactive origin $(git_main_branch)'
alias gprum='git pull --rebase upstream $(git_main_branch)' alias gprum='git pull --rebase upstream $(git_main_branch)'
alias gprumi='git pull --rebase=interactive upstream $(git_main_branch)' alias gprumi='git pull --rebase=interactive upstream $(git_main_branch)'
alias ggpull='git pull origin "$(git_current_branch)"'
function ggl() { function ggl() {
if [[ $# != 0 ]] && [[ $# != 1 ]]; then if [[ $# != 0 ]] && [[ $# != 1 ]]; then
@@ -324,6 +326,7 @@ is-at-least 2.30 "$git_version" \
alias gpv='git push --verbose' alias gpv='git push --verbose'
alias gpoat='git push origin --all && git push origin --tags' alias gpoat='git push origin --all && git push origin --tags'
alias gpod='git push origin --delete' alias gpod='git push origin --delete'
alias ggpush='git push origin "$(git_current_branch)"'
function ggp() { function ggp() {
if [[ $# != 0 ]] && [[ $# != 1 ]]; then if [[ $# != 0 ]] && [[ $# != 1 ]]; then
@@ -420,9 +423,6 @@ unset git_version
local old_name new_name local old_name new_name
for old_name new_name ( for old_name new_name (
current_branch git_current_branch current_branch git_current_branch
ggpull ggl
ggpur ggu
ggpush ggp
); do ); do
aliases[$old_name]=" aliases[$old_name]="
print -Pu2 \"%F{yellow}[oh-my-zsh] '%F{red}${old_name}%F{yellow}' is deprecated, using '%F{green}${new_name}%F{yellow}' instead.%f\" print -Pu2 \"%F{yellow}[oh-my-zsh] '%F{red}${old_name}%F{yellow}' is deprecated, using '%F{green}${new_name}%F{yellow}' instead.%f\"