diff options
author | Eric Wong <e@80x24.org> | 2024-05-09 00:39:01 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2024-05-09 03:08:01 +0000 |
commit | 39c390da4f5793bdd08a3634ca34ed9c9bda0700 (patch) | |
tree | 75d879b15388519020222eeff485a479469513ac /lib/PublicInbox/V2Writable.pm | |
parent | cf3df165033bf36631bd890fa2375339cd95c593 (diff) | |
download | public-inbox-master.tar.gz |
Repeatedly checking $PATH for `git' when we need to call it multiple times in quick succession doesn't seem useful. So avoid some expensive stat(2) syscalls to make things less bad for systems which require expensive CPU vulnerability mitigations. This also saves a bunch of memory allocations since we do the $PATH lookup in pure Perl to avoid doing the uncacheable lookup in a vfork-ed child.
Diffstat (limited to 'lib/PublicInbox/V2Writable.pm')
-rw-r--r-- | lib/PublicInbox/V2Writable.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/PublicInbox/V2Writable.pm b/lib/PublicInbox/V2Writable.pm index 43f37f60..15a73158 100644 --- a/lib/PublicInbox/V2Writable.pm +++ b/lib/PublicInbox/V2Writable.pm @@ -1071,8 +1071,8 @@ sub unindex_todo ($$$) { return if $before == $after; # ensure any blob can not longer be accessed via dumb HTTP - run_die(['git', "--git-dir=$unit->{git}->{git_dir}", - qw(-c gc.reflogExpire=now gc --prune=all --quiet)]); + run_die($unit->{git}->cmd(qw(-c gc.reflogExpire=now gc + --prune=all --quiet))); } sub sync_ranges ($$) { |