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

@ -594,8 +594,7 @@ sub post_fetch_checkout {
my $index = $ENV{GIT_INDEX_FILE} || "$ENV{GIT_DIR}/index";
return if -f $index;
chomp(my $bare = `git config --bool --get core.bare`);
return if $bare eq 'true';
return if command_oneline(qw/rev-parse --is-bare-repository/) eq 'true';
return if command_oneline(qw/rev-parse --is-inside-git-dir/) eq 'true';
command_noisy(qw/read-tree -m -u -v HEAD HEAD/);
print STDERR "Checked out HEAD:\n ",