diff options
author | Eric Wong <e@80x24.org> | 2021-01-02 12:12:06 -1400 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-01-03 18:30:26 +0000 |
commit | f87d3c32bace1552ab7f3a0437e5d6628d0ab5c5 (patch) | |
tree | d0ba496702cdeb71c4f8c7d007bea2cb73fdbf75 /lib/PublicInbox/Gcf2.pm | |
parent | 8ee251fcd420533c7b69f40c18f3536bcc30abaf (diff) | |
download | public-inbox-f87d3c32bace1552ab7f3a0437e5d6628d0ab5c5.tar.gz |
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).
Diffstat (limited to 'lib/PublicInbox/Gcf2.pm')
-rw-r--r-- | lib/PublicInbox/Gcf2.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/PublicInbox/Gcf2.pm b/lib/PublicInbox/Gcf2.pm index 0d5c8c57..01b83c96 100644 --- a/lib/PublicInbox/Gcf2.pm +++ b/lib/PublicInbox/Gcf2.pm @@ -75,9 +75,9 @@ sub add_alt ($$) { $gcf2->add_alternate($objdir); } -# Usage: $^X -MPublicInbox::Gcf2 -e 'PublicInbox::Gcf2::loop()' +# Usage: $^X -MPublicInbox::Gcf2 -e PublicInbox::Gcf2::loop # (see lib/PublicInbox/Gcf2Client.pm) -sub loop { +sub loop () { my $gcf2 = new(); my %seen; STDERR->autoflush(1); |