From b5b45e8701aa2a76acd8871a87ab4377942d30ad Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Tue, 4 Apr 2023 06:55:50 -0300 Subject: bin/vcs: Also consider to be under Git when both $GIT_{DIR,WORK_TREE} are set --- bin/vcs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bin/vcs') diff --git a/bin/vcs b/bin/vcs index ed50b68..a1731ed 100755 --- a/bin/vcs +++ b/bin/vcs @@ -13,7 +13,7 @@ cvs guess_type() { - if [ -e "$1"/.git ]; then + if [ -e "$1"/.git ] || ([ -n "${GIT_DIR:-}" ] && [ -n "$GIT_WORK_TREE" ]); then echo git elif [ -e "$1"/.hg ]; then echo mercurial -- cgit v1.2.3