Might as well, since the only constraint is filesystem space
for temporary files for public-inbox-httpd users.
-httpd can fairly share work across clients with our use of
psgi_qx; and there's a recent patch series in git@vger with 64
patches in sequence.
use POSIX qw(sysconf _SC_ARG_MAX);
my $ARG_SIZE_MAX = (sysconf(_SC_ARG_MAX) || 4096) - 2048;
use POSIX qw(sysconf _SC_ARG_MAX);
my $ARG_SIZE_MAX = (sysconf(_SC_ARG_MAX) || 4096) - 2048;
+# By default, "git format-patch" generates filenames with a four-digit
+# prefix, so that means 9999 patch series are OK, right? :>
+# Maybe we can make this configurable, main concern is disk space overhead
+# for uncompressed patch fragments. Aside from space, public-inbox-httpd
+# is otherwise unaffected by having many patches, here, as it can share
+# work fairly. Other PSGI servers may have trouble, though.
+my $MAX_PATCH = 9999;
+
# di = diff info / a hashref with information about a diff ($di):
# {
# oid_a => abbreviated pre-image oid,
# di = diff info / a hashref with information about a diff ($di):
# {
# oid_a => abbreviated pre-image oid,
sub resolve_patch ($$) {
my ($self, $want) = @_;
sub resolve_patch ($$) {
my ($self, $want) = @_;
- if (scalar(@{$self->{patches}}) > $self->{max_patch}) {
+ if (scalar(@{$self->{patches}}) > $MAX_PATCH) {
die "Aborting, too many steps to $self->{oid_want}";
}
die "Aborting, too many steps to $self->{oid_want}";
}
bless {
gits => $ibx->{-repo_objs},
user_cb => $user_cb,
bless {
gits => $ibx->{-repo_objs},
user_cb => $user_cb,
# TODO: config option for searching related inboxes
inboxes => [ $ibx ],
# TODO: config option for searching related inboxes
inboxes => [ $ibx ],