refactor(git)!: Start deprecating ggpull/ggpur/ggpush for their alternative functions

This commit is contained in:
Arvin Verain 2025-06-02 02:18:46 +08:00
commit 118ffe6fc1
No known key found for this signature in database
GPG key ID: EC2BB2E0EC3CE2FA
2 changed files with 6 additions and 6 deletions

View file

@ -110,7 +110,6 @@ function ggpnp() {
}
compdef _git ggpnp=git-checkout
alias ggpur='ggu'
alias g='git'
alias ga='git add'
alias gaa='git add --all'
@ -290,7 +289,6 @@ alias gprom='git pull --rebase origin $(git_main_branch)'
alias gpromi='git pull --rebase=interactive origin $(git_main_branch)'
alias gprum='git pull --rebase upstream $(git_main_branch)'
alias gprumi='git pull --rebase=interactive upstream $(git_main_branch)'
alias ggpull='git pull origin "$(git_current_branch)"'
function ggl() {
if [[ $# != 0 ]] && [[ $# != 1 ]]; then
@ -334,7 +332,6 @@ is-at-least 2.30 "$git_version" \
alias gpv='git push --verbose'
alias gpoat='git push origin --all && git push origin --tags'
alias gpod='git push origin --delete'
alias ggpush='git push origin "$(git_current_branch)"'
function ggp() {
if [[ $# != 0 ]] && [[ $# != 1 ]]; then
@ -430,6 +427,9 @@ unset git_version
# Logic for adding warnings on deprecated aliases
local old_alias new_alias
for old_alias new_alias (
ggpull ggl
ggpur ggu
ggpush ggp
); do
aliases[$old_alias]="
print -Pu2 \"%F{yellow}[oh-my-zsh] '%F{red}${old_alias}%F{yellow}' is a deprecated alias, using '%F{green}${new_alias}%F{yellow}' instead.%f\"