]> Sergey Matveev's repositories - public-inbox.git/commit
gcf2client: split out request API from regular git
authorEric Wong <e@80x24.org>
Sun, 3 Jan 2021 02:12:06 +0000 (12:12 -1400)
committerEric Wong <e@80x24.org>
Sun, 3 Jan 2021 18:30:26 +0000 (18:30 +0000)
commitf87d3c32bace1552ab7f3a0437e5d6628d0ab5c5
treed0ba496702cdeb71c4f8c7d007bea2cb73fdbf75
parent8ee251fcd420533c7b69f40c18f3536bcc30abaf
gcf2client: split out request API from regular git

While Gcf2Client is designed to mimic what git-cat-file writes
to stdout, its request format is different to support requests
with a git repository path included.

We'll highlight the distinction and make the GitAsyncCat support
code easier-to-follow as a result.

Since Gcf2Client relies on DS, we can rely on DS-specific code
here, too, and use a single Unix socket instead of separate
input and output pipes, reducing memory overhead in both users
and kernel space.  Due to the interactive nature of requests and
responses, the buffer size limitations of Unix sockets on Linux
seems inconsequential here (just like it is for existing "git
cat-file --batch" use).
lib/PublicInbox/Gcf2.pm
lib/PublicInbox/Gcf2Client.pm
lib/PublicInbox/GitAsyncCat.pm
t/gcf2_client.t