From d8cc4b1a123e840685ba4b7d006a44aab2c11a78 Mon Sep 17 00:00:00 2001 From: tslil clingman Date: Thu, 19 Dec 2024 21:03:01 +0000 Subject: vcs: better detection of git repository --- vcs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'vcs') diff --git a/vcs b/vcs index a61386e..bb6aa90 100755 --- a/vcs +++ b/vcs @@ -11,7 +11,7 @@ VCS_MOD="" VCS_REC="" SPC="" -if [ -d ".git" ] || [ -d "../.git" ] || [ -d "../../.git" ]; then +if git rev-parse --is-inside-work-tree &>/dev/null; then outp=$(git status) VCS_STR="×" VCS_INF="$(echo "$outp" | head -n 1 | cut -d' ' -f 3-)" -- cgit v1.2.3