summaryrefslogtreecommitdiff
path: root/config/services/git/shell-commands/repo/src/lib/is-git-dir.sh
diff options
context:
space:
mode:
Diffstat (limited to 'config/services/git/shell-commands/repo/src/lib/is-git-dir.sh')
-rw-r--r--config/services/git/shell-commands/repo/src/lib/is-git-dir.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/config/services/git/shell-commands/repo/src/lib/is-git-dir.sh b/config/services/git/shell-commands/repo/src/lib/is-git-dir.sh
new file mode 100644
index 0000000..d94f2ba
--- /dev/null
+++ b/config/services/git/shell-commands/repo/src/lib/is-git-dir.sh
@@ -0,0 +1,3 @@
+is-git-dir() {
+ git rev-parse --resolve-git-dir "$1" 2>/dev/null
+}