mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-05 01:46:46 +01:00
refactor(git)!: Start deprecating ggpull/ggpur/ggpush for their alternative functions
This commit is contained in:
parent
c177f9dcdf
commit
118ffe6fc1
2 changed files with 6 additions and 6 deletions
|
|
@ -240,13 +240,13 @@ receive further support.
|
|||
| `gcl` | `git config --list` | New alias: `gcf`. |
|
||||
| `gdc` | `git diff --cached` | New alias: `gdca`. |
|
||||
| `gdt` | `git difftool` | No replacement. |
|
||||
| `ggpull` | `git pull origin $(current_branch)` | New alias: `ggl`. (`ggpull` still exists for now though.) |
|
||||
| `ggpur` | `git pull --rebase origin $(current_branch)` | New alias: `ggu`. (`ggpur` still exists for now though.) |
|
||||
| `ggpush` | `git push origin $(current_branch)` | New alias: `ggp`. (`ggpush` still exists for now though.) |
|
||||
| `gk` | `gitk --all --branches` | Now aliased to `gitk --all --branches`. |
|
||||
| `glg` | `git log --stat --max-count=10` | Now aliased to `git log --stat --color`. |
|
||||
| `glgg` | `git log --graph --max-count=10` | Now aliased to `git log --graph --color`. |
|
||||
| `gwc` | `git whatchanged -p --abbrev-commit --pretty = medium` | New alias: `gwch`. |
|
||||
| `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
|
||||
|
||||
|
|
|
|||
|
|
@ -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\"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue