diff --git a/modules/git/functions/git-commit-lost b/modules/git/functions/git-commit-lost index 671e1e7..b327ec7 100644 --- a/modules/git/functions/git-commit-lost +++ b/modules/git/functions/git-commit-lost @@ -1,4 +1,4 @@ -if ! is-true "$(command git rev-parse --is-inside-work-tree 2> /dev/null)"; then +if ! command git rev-parse --is-inside-work-tree >/dev/null 2>&1; then print "${0}: not a repository work tree: ${PWD}" >&2 return 1 fi diff --git a/modules/git/functions/git-stash-clear-interactive b/modules/git/functions/git-stash-clear-interactive index 0197be9..1342364 100644 --- a/modules/git/functions/git-stash-clear-interactive +++ b/modules/git/functions/git-stash-clear-interactive @@ -1,4 +1,4 @@ -if ! is-true "$(command git rev-parse --is-inside-work-tree 2> /dev/null)"; then +if ! command git rev-parse --is-inside-work-tree >/dev/null 2>&1; then print "${0}: not a repository work tree: ${PWD}" >&2 return 1 fi diff --git a/modules/git/functions/git-stash-dropped b/modules/git/functions/git-stash-dropped index 1cc979b..2190d05 100644 --- a/modules/git/functions/git-stash-dropped +++ b/modules/git/functions/git-stash-dropped @@ -1,4 +1,4 @@ -if ! is-true "$(command git rev-parse --is-inside-work-tree 2> /dev/null)"; then +if ! command git rev-parse --is-inside-work-tree >/dev/null 2>&1; then print "${0}: not a repository work tree: ${PWD}" >&2 return 1 fi diff --git a/modules/git/functions/git-stash-recover b/modules/git/functions/git-stash-recover index 8b5adec..cdfbc2f 100644 --- a/modules/git/functions/git-stash-recover +++ b/modules/git/functions/git-stash-recover @@ -1,4 +1,4 @@ -if ! is-true "$(command git rev-parse --is-inside-work-tree 2> /dev/null)"; then +if ! command git rev-parse --is-inside-work-tree >/dev/null 2>&1; then print "${0}: not a repository work tree: ${PWD}" >&2 return 1 fi diff --git a/modules/git/functions/git-submodule-move b/modules/git/functions/git-submodule-move index 2f7132c..0596785 100644 --- a/modules/git/functions/git-submodule-move +++ b/modules/git/functions/git-submodule-move @@ -1,4 +1,4 @@ -if ! is-true "$(command git rev-parse --is-inside-work-tree 2> /dev/null)"; then +if ! command git rev-parse --is-inside-work-tree >/dev/null 2>&1; then print "${0}: not a repository work tree: ${PWD}" >&2 return 1 elif [[ "${PWD}" != "$(git-root)" ]]; then diff --git a/modules/git/functions/git-submodule-remove b/modules/git/functions/git-submodule-remove index 033d39a..aa4c852 100644 --- a/modules/git/functions/git-submodule-remove +++ b/modules/git/functions/git-submodule-remove @@ -1,4 +1,4 @@ -if ! is-true "$(command git rev-parse --is-inside-work-tree 2> /dev/null)"; then +if ! command git rev-parse --is-inside-work-tree >/dev/null 2>&1; then print "${0}: not a repository work tree: ${PWD}" >&2 return 1 elif [[ "${PWD}" != "$(git-root)" ]]; then