From c4aa293b2320feb805c5afeaa373f608e5bc8618 Mon Sep 17 00:00:00 2001 From: "Eric Wong (Contractor, The Linux Foundation)" Date: Fri, 30 Mar 2018 17:46:31 +0000 Subject: v2: respect core.sharedRepository in git configs Ensure -convert and -compact do not make repositories unreadable on live servers. --- lib/PublicInbox/InboxWritable.pm | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'lib/PublicInbox/InboxWritable.pm') diff --git a/lib/PublicInbox/InboxWritable.pm b/lib/PublicInbox/InboxWritable.pm index 92b9016e..5c11a36c 100644 --- a/lib/PublicInbox/InboxWritable.pm +++ b/lib/PublicInbox/InboxWritable.pm @@ -168,10 +168,7 @@ sub import_mbox { sub _read_git_config_perm { my ($self) = @_; my @cmd = qw(config); - if (($self->{version} ||= 1) == 2) { - push @cmd, "--file=$self->{mainrepo}/all.git/config"; - } - chomp(my $perm = $self->git->qx(@cmd, 'core.sharedRepository')); + chomp(my $perm = $self->git->qx('config', 'core.sharedRepository')); $perm; } -- cgit v1.2.3-24-ge0c7