1
0
mirror of https://github.com/dcarrillo/prezto.git synced 2025-07-02 00:29: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:
Diego Rabatone Oliveira
2018-03-05 05:56:25 -03:00
committed by Kaleb Elwert
parent e00562e7cf
commit b3c27bb164
16 changed files with 54 additions and 54 deletions

View File

@ -7,7 +7,7 @@
# function git-submodule-move {
if ! is-true "$(git rev-parse --is-inside-work-tree 2> /dev/null)"; then
if ! is-true "$(command git rev-parse --is-inside-work-tree 2> /dev/null)"; then
print "$0: not a repository work tree: $PWD" >&2
return 1
elif [[ "$PWD" != "$(git-root)" ]]; then
@ -19,7 +19,7 @@ local src="$1"
local dst="$2"
local url
url="$(git config --file "$(git-root)/.gitmodules" --get "submodule.${src}.url")"
url="$(command git config --file "$(git-root)/.gitmodules" --get "submodule.${src}.url")"
if [[ -z "$url" ]]; then
print "$0: submodule not found: $src" >&2
@ -29,7 +29,7 @@ fi
mkdir -p "${dst:h}"
git-submodule-remove "$src"
git submodule add "$url" "$dst"
command git submodule add "$url" "$dst"
return 0