public-inbox.git  about / heads / tags
an "archives first" approach to mailing lists
blob c22f2fcc9839601c7aeeaac005536c6fec1adf6f 581 bytes (raw)
$ git show repobrowse:lib/PublicInbox/GitAsyncWr.pm	# shows this blob on the CLI

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
 
# Copyright (C) 2016 all contributors <meta@public-inbox.org>
# License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
#
# internal class used by PublicInbox::Git + Danga::Socket
# This writes to the input pipe of "git cat-file --batch/--batch-check"
package PublicInbox::GitAsyncWr;
use strict;
use warnings;
use base qw(Danga::Socket);

sub new {
	my ($class, $io) = @_;
	my $self = fields::new($class);
	IO::Handle::blocking($io, 0);
	$self->SUPER::new($io);
}

# we only care about write + event_write

sub event_hup { $_[0]->close }
sub event_err { $_[0]->close }

1;

git clone https://public-inbox.org/public-inbox.git
git clone http://7fh6tueqddpjyxjmgtdiueylzoqt6pt7hec3pukyptlmohoowvhde4yd.onion/public-inbox.git