This avoids unnecessary writes to the FETCH_HEAD file, which is
worthless in multi-remote mirrors. Actually, I haven't found
FETCH_HEAD useful anywhere since the `/remotes/' namespace
became popular...
my $EXE_ST = ''; # pack('dd', st_ctime, st_size);
my ($GIT_EXE, $GIT_VER);
my $EXE_ST = ''; # pack('dd', st_ctime, st_size);
my ($GIT_EXE, $GIT_VER);
+sub version {
+ check_git_exe();
+ $GIT_VER;
+}
+
sub check_git_exe () {
$GIT_EXE = which('git') // die "git not found in $ENV{PATH}";
my @st = stat($GIT_EXE) or die "stat: $!";
sub check_git_exe () {
$GIT_EXE = which('git') // die "git not found in $ENV{PATH}";
my @st = stat($GIT_EXE) or die "stat: $!";
use URI;
use PublicInbox::Config;
use PublicInbox::Inbox;
use URI;
use PublicInbox::Config;
use PublicInbox::Inbox;
use PublicInbox::LeiCurl;
use PublicInbox::OnDestroy;
use PublicInbox::SHA qw(sha256_hex sha1_hex);
use PublicInbox::LeiCurl;
use PublicInbox::OnDestroy;
use PublicInbox::SHA qw(sha256_hex sha1_hex);
($lei->{opt}->{jobs} // 1) > 1;
push @cmd, '-v' if $lei->{opt}->{verbose};
push(@cmd, '-p') if $lei->{opt}->{prune};
($lei->{opt}->{jobs} // 1) > 1;
push @cmd, '-v' if $lei->{opt}->{verbose};
push(@cmd, '-p') if $lei->{opt}->{prune};
+ PublicInbox::Git::version() >= ((2 << 24) | (29 << 16)) and
+ push(@cmd, '--no-write-fetch-head');