]> Sergey Matveev's repositories - public-inbox.git/commit
v2writable: git_hash_raw: avoid $TMPDIR write
authorEric Wong <e@yhbt.net>
Fri, 17 Jul 2020 07:25:07 +0000 (07:25 +0000)
committerEric Wong <e@yhbt.net>
Fri, 17 Jul 2020 20:56:55 +0000 (20:56 +0000)
commit340652d9833d9b7de4724a721e7014bfed262ccf
tree4ab07df02930b542553a40f3ad8d1b72bad56c25
parent592f8239dceb6604e538fd51e62bcce50d6e1972
v2writable: git_hash_raw: avoid $TMPDIR write

We can rely on FD_CLOEXEC being set by default (since Perl 5.6+)
on pipes to avoid FS/page-cache traffic, here.  We also know
"git hash-object" won't output anything until it's consumed all
of its standard input; so there's no danger of a deadlock even
in the the unlikely case git uses a hash that can't fit into
PIPE_BUF :P
lib/PublicInbox/V2Writable.pm