Unverified Commit 7824dc63 authored by Marc Cornellà's avatar Marc Cornellà Committed by GitHub
Browse files

git: use is-at-least to test for git version

Fixes #7754
parent 8d7ce18e
...@@ -241,7 +241,8 @@ alias gss='git status -s' ...@@ -241,7 +241,8 @@ alias gss='git status -s'
alias gst='git status' alias gst='git status'
# use the default stash push on git 2.13 and newer # use the default stash push on git 2.13 and newer
[[ "$(git --version 2>/dev/null)" =~ '^git version ([0-9]+.[0-9]+)' && "$match" -ge '2.13' ]] \ autoload -Uz is-at-least
is-at-least 2.13 "$(git --version 2>/dev/null | awk '{print $3}')" \
&& alias gsta='git stash push' \ && alias gsta='git stash push' \
|| alias gsta='git stash save' || alias gsta='git stash save'
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment