diff --git a/lib/git/git_is_repo.fish b/lib/git/git_is_repo.fish index f72986a..4ce2ff9 100644 --- a/lib/git/git_is_repo.fish +++ b/lib/git/git_is_repo.fish @@ -1,3 +1,7 @@ function git_is_repo -d "Check if directory is a repository" - test -d .git; or command git rev-parse --git-dir >/dev/null 2> /dev/null + test -d .git + or begin + set -l info (command git rev-parse --git-dir --is-bare-repository 2>/dev/null) + and test $info[2] = false + end end