]> git.ipfire.org Git - thirdparty/git.git/blobdiff - git-sh-setup.sh
require_work_tree broken with NONGIT_OK
[thirdparty/git.git] / git-sh-setup.sh
index 7bef43f39d0d74497104351d2f40258dfccce104..d2789410de3dc833cc7d3503ed9ea7d343d040ac 100755 (executable)
@@ -59,7 +59,7 @@ cd_to_toplevel () {
 }
 
 require_work_tree () {
-       test $(git rev-parse --is-inside-work-tree) = true ||
+       test "$(git rev-parse --is-inside-work-tree 2>/dev/null)" = true ||
        die "fatal: $0 cannot be used without a working tree."
 }