Code

introduce GIT_WORK_TREE to specify the work tree
[git.git] / git-sh-setup.sh
index f24c7f2d23c13e9874308a019f3c0f93225de3c0..9ac657a70e67315f46a0c42611d7e6d78f538031 100755 (executable)
@@ -29,11 +29,7 @@ set_reflog_action() {
 }
 
 is_bare_repository () {
-       git-config --bool --get core.bare ||
-       case "$GIT_DIR" in
-       .git | */.git) echo false ;;
-       *) echo true ;;
-       esac
+       git-rev-parse --is-bare-repository
 }
 
 cd_to_toplevel () {