mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-12-19 02:41:57 +00:00
fix(git-commit): add omz version check
This commit is contained in:
parent
2c62584b83
commit
b6c1de87b0
1 changed files with 3 additions and 4 deletions
|
@ -1,7 +1,8 @@
|
||||||
if git config --global --get-all alias.$_alias >/dev/null 2>&1 \
|
local _rev="$(git -C $ZSH rev-parse HEAD 2> /dev/null)"
|
||||||
&& ! git config --global --get-all oh-my-zsh.git-commit-alias >/dev/null 2>&1; then
|
if [[ $_rev == $(git config --global --get oh-my-zsh.git-commit-alias 2> /dev/null) ]]; then
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
git config --global oh-my-zsh.git-commit-alias "$_rev"
|
||||||
|
|
||||||
local -a _git_commit_aliases
|
local -a _git_commit_aliases
|
||||||
_git_commit_aliases=(
|
_git_commit_aliases=(
|
||||||
|
@ -55,5 +56,3 @@ git commit -m "'$_type'${_scope:+(${_scope})}${_attention}:${_message}"
|
||||||
|
|
||||||
git config --global alias.$_alias "$_func"
|
git config --global alias.$_alias "$_func"
|
||||||
done
|
done
|
||||||
|
|
||||||
git config --global oh-my-zsh.git-commit-alias "true"
|
|
||||||
|
|
Loading…
Reference in a new issue