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:

committed by
Junio C Hamano

parent
4faac2468d
commit
493c774e58
@ -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 () {
|
||||
|
Reference in New Issue
Block a user