summaryrefslogtreecommitdiff
path: root/vcs
diff options
context:
space:
mode:
authortslil clingman <tslil@posteo.de>2024-12-19 21:03:01 +0000
committertslil clingman <tslil@posteo.de>2024-12-19 21:03:01 +0000
commitd8cc4b1a123e840685ba4b7d006a44aab2c11a78 (patch)
tree727d6c6bbaeb7ba524f0ea051a4e48c9038821f0 /vcs
parent48f854bc81f67e73c78734f4f33dfa70dc6a7f73 (diff)
vcs: better detection of git repository
Diffstat (limited to 'vcs')
-rwxr-xr-xvcs2
1 files changed, 1 insertions, 1 deletions
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-)"