diff options
author | Tom D <noreplygitemail@protonmail.com> | 2023-05-26 09:43:17 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-26 09:43:17 +0200 |
commit | fb4213c34ff8ec83cbe6251f432fdac383378562 (patch) | |
tree | 28f5134b1358f583c57dcd7396f82e932a440126 /plugins | |
parent | 5901f30b44fc5a3055e6b801d3d71af6d2359ee8 (diff) | |
download | zsh-fb4213c34ff8ec83cbe6251f432fdac383378562.tar.gz zsh-fb4213c34ff8ec83cbe6251f432fdac383378562.tar.bz2 zsh-fb4213c34ff8ec83cbe6251f432fdac383378562.zip |
perf(git): improve `gunwip` alias (#11714)
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/git/README.md | 2 | ||||
-rw-r--r-- | plugins/git/git.plugin.zsh | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/plugins/git/README.md b/plugins/git/README.md index f87d3fbca..2742aa539 100644 --- a/plugins/git/README.md +++ b/plugins/git/README.md @@ -186,7 +186,7 @@ plugins=(... git) | gtv | git tag \| sort -V | | gtl | gtl(){ git tag --sort=-v:refname -n --list ${1}\* }; noglob gtl | | gunignore | git update-index --no-assume-unchanged | -| gunwip | git log --max-count=1 \| grep -q -c "\-\-wip\-\-" && git reset HEAD~1 | +| gunwip | git rev-list --max-count=1 --format="%s" HEAD \| grep -q "\-\-wip\-\-" && git reset HEAD~1 | | gup | git pull --rebase | | gupv | git pull --rebase --verbose | | gupa | git pull --rebase --autostash | diff --git a/plugins/git/git.plugin.zsh b/plugins/git/git.plugin.zsh index 3c8d53c8c..4be865f6a 100644 --- a/plugins/git/git.plugin.zsh +++ b/plugins/git/git.plugin.zsh @@ -312,7 +312,7 @@ alias gtv='git tag | sort -V' alias gtl='gtl(){ git tag --sort=-v:refname -n --list "${1}*" }; noglob gtl' alias gunignore='git update-index --no-assume-unchanged' -alias gunwip='git log --max-count=1 | grep -q -c "\--wip--" && git reset HEAD~1' +alias gunwip='git rev-list --max-count=1 --format="%s" HEAD | grep -q "\--wip--" && git reset HEAD~1' alias gup='git pull --rebase' alias gupv='git pull --rebase --verbose' alias gupa='git pull --rebase --autostash' |