rev-parse: introduce --is-bare-repository

Signed-off-by: Matthias Lederhofer <matled@gmx.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Matthias Lederhofer
2007-06-03 16:46:36 +02:00
committed by Junio C Hamano
parent 4faac2468d
commit 493c774e58
4 changed files with 10 additions and 7 deletions

View File

@ -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 () {