mirror of
https://github.com/dcarrillo/prezto.git
synced 2025-07-01 09:19:25 +00:00
Replace git with 'command git' (#1551)
to improve performance if git is aliased to hub or other wrappers.
This commit is contained in:
committed by
Kaleb Elwert
parent
e00562e7cf
commit
b3c27bb164
@ -7,12 +7,12 @@
|
||||
|
||||
# function git-branch-current {
|
||||
|
||||
if ! git rev-parse 2> /dev/null; then
|
||||
if ! command git rev-parse 2> /dev/null; then
|
||||
print "$0: not a repository: $PWD" >&2
|
||||
return 1
|
||||
fi
|
||||
|
||||
local ref="$(git symbolic-ref HEAD 2> /dev/null)"
|
||||
local ref="$(command git symbolic-ref HEAD 2> /dev/null)"
|
||||
|
||||
if [[ -n "$ref" ]]; then
|
||||
print "${ref#refs/heads/}"
|
||||
|
Reference in New Issue
Block a user