[PATCH 03/13] view: show thread context in the thread-aware flat view

2016-06-30 Thread Eric Wong
This lets user have a small window of the context of the current message relative to other threads. --- lib/PublicInbox/Feed.pm | 3 +- lib/PublicInbox/SearchView.pm | 2 +- lib/PublicInbox/View.pm | 160 +- 3 files changed, 100

[PATCH 09/13] view: fix up some HTML injection via Message-ID vectors

2016-06-30 Thread Eric Wong
Oops, these were only introduced during the hybrid flat thread view reworking and never deployed. --- lib/PublicInbox/View.pm | 17 ++--- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm index 17d6de5..44130b9 100644 ---

[PATCH 0/13] www: hybrid flat+thread conversation view

2016-06-30 Thread Eric Wong
uce server/caching overheads but I still find it more usable in some situations. What I still enjoy is being able to toggle between [flat|threaded] views. Eric Wong (13): www: implement hybrid flat+thread conversation view www: use WwwStream for dumping thread and search views v

[PATCH 1/2] view: improve readability of msg_reply with here-doc

2016-06-30 Thread Eric Wong
This should make formatting more apparent since we can rely on semantics. --- lib/PublicInbox/View.pm | 36 ++-- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm index 27dd155..9d48dfc 100644 ---

[PATCH 0/2] view: reply instruction tweaks

2016-06-30 Thread Eric Wong
It may be 2016, but top-posting still makes me cringe :< Eric Wong (2): view: improve readability of msg_reply with here-doc view: reference posting style article on Wikipedia lib/PublicInbox/View.pm | 42 -- 1 file changed, 28 inserti

[PATCH] searchview: show result count in thread index, for now

2016-06-30 Thread Eric Wong
I'm not sure what to show here, actually; but it's better than triggering an uninitialized variable warning. --- lib/PublicInbox/SearchView.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/PublicInbox/SearchView.pm b/lib/PublicInbox/SearchView.pm index 30a310c..d019a0f 100644 ---

[PATCH 12/13] view: fixup bad reference to new_msgid

2016-06-30 Thread Eric Wong
Oops, this endpoint needs testing :x --- lib/PublicInbox/View.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm index db2bd20..b4f80d1 100644 --- a/lib/PublicInbox/View.pm +++ b/lib/PublicInbox/View.pm @@ -129,7 +129,7 @@ sub

[PATCH 05/13] feed: add $INBOX/new.html endpoint

2016-06-30 Thread Eric Wong
This acts like the Atom feed; but should be viewable directly from browsers. --- lib/PublicInbox/Feed.pm | 27 +++ lib/PublicInbox/WWW.pm | 10 +- 2 files changed, 36 insertions(+), 1 deletion(-) diff --git a/lib/PublicInbox/Feed.pm b/lib/PublicInbox/Feed.pm

[PATCH 01/13] www: implement hybrid flat+thread conversation view

2016-06-30 Thread Eric Wong
This should be more accessible to readers on narrow terminals (or giant fonts) while providing a chronological view which is also aware of message threading relationships. --- TODO | 2 - lib/PublicInbox/SearchView.pm | 42 +++ lib/PublicInbox/View.pm | 248

[PATCH 04/13] view: merge $state hash with existing $ctx

2016-06-30 Thread Eric Wong
This reduces the level of indirection to reach certain objects within the hash and there are no namespace or lifetime conflicts anyways. --- lib/PublicInbox/Feed.pm | 25 +++ lib/PublicInbox/SearchView.pm | 25 +++ lib/PublicInbox/View.pm | 149

[PATCH 06/13] view: tweak thread/index header slightly

2016-06-30 Thread Eric Wong
This makes the top permalink/raw as well as the In-Reply-To show up without search. While we're at it, try to make the links on the thread index from the "X siblings, Y replies" more obvious. --- lib/PublicInbox/View.pm | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff

[PATCH 10/13] view: default to flat/hybrid thread display

2016-06-30 Thread Eric Wong
This is friendlier for people on small screens and usually eliminates the need to scroll horizontally. --- lib/PublicInbox/View.pm | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm index 44130b9..22d7250 100644 ---

[PATCH 13/13] www_stream: add response wrapper sub

2016-06-30 Thread Eric Wong
This encapsulates an entire PSGI response array, hopefully making it easier to generate responses and avoid typos when setting the Content-Type. --- lib/PublicInbox/Feed.pm | 3 +-- lib/PublicInbox/SearchView.pm | 4 +--- lib/PublicInbox/View.pm | 8 +++- lib/PublicInbox/WWW.pm

[PATCH 11/13] view: show thread size when linking to summary

2016-06-30 Thread Eric Wong
This should give readers a better idea of what to expect. --- lib/PublicInbox/View.pm | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm index 22d7250..fac53eb 100644 --- a/lib/PublicInbox/View.pm +++

[PATCH 14/13] view: fix permalink and raw links at the top

2016-06-30 Thread Eric Wong
Oops :x I really need to whip check-inbox.perl into shape or at least start running it, again. Fixes: e29518088b3f ("view: fix up some HTML injection via Message-ID vectors") --- lib/PublicInbox/View.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH] view: move per-message anchor to top in conversation view

2016-06-30 Thread Eric Wong
This fixes the '^' (up) link in the $INBOX/new.html endpoint for search-less displays. --- lib/PublicInbox/View.pm | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm index 8487c2a..11d8dd5 100644 ---

[PATCH 0/2] HTTPS smart git repository for our code

2016-06-30 Thread Eric Wong
Eating our own dogfood, git://80x24.org/public-inbox remains available for those without curl or up-to-date TLS stack/certs. Eric Wong (2): githttpbackend: allow git to be a regular scalar string update git repo location to https:// using GitHTTPBackend.pm Documentation/dc-dlvr-spam

[PATCH 1/2] githttpbackend: allow git to be a regular scalar string

2016-06-30 Thread Eric Wong
No point in forcing users to pass a hashref/object to get a single git directory. --- lib/PublicInbox/GitHTTPBackend.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/PublicInbox/GitHTTPBackend.pm b/lib/PublicInbox/GitHTTPBackend.pm index 7267a1d..4f58c6b 100644 ---

[PATCH] www_stream: fix search for new.html endpoint

2016-06-30 Thread Eric Wong
We want to avoid the bare './' wherever possible, but it doesn't seem possible here. --- lib/PublicInbox/WwwStream.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/PublicInbox/WwwStream.pm b/lib/PublicInbox/WwwStream.pm index 6de1b31..d9abb5a 100644 ---

[PATCH] searchview: add missing newline in search results

2016-06-30 Thread Eric Wong
Hrm... is there a more obvious way to do an internal API for this while still being streamable? --- lib/PublicInbox/SearchView.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/PublicInbox/SearchView.pm b/lib/PublicInbox/SearchView.pm index d019a0f..ce1eff1 100644 ---

[PATCH 3/2] git: allow cloning from the URL root, too

2016-06-30 Thread Eric Wong
This means we can still show non-git users a somewhat browseable URL with a link to the README.html file while allowing git users to type less when cloning. All of the following are supported: git clone https://public-inbox.org/ public-inbox git clone https://public-inbox.org/public-inbox git

[PATCH 4/2] www_stream: fix stupid typo :x

2016-06-30 Thread Eric Wong
Note to self: remember to run tests Fixes: 52052329aced ("git: allow cloning from the URL root, too") --- lib/PublicInbox/WwwStream.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/PublicInbox/WwwStream.pm b/lib/PublicInbox/WwwStream.pm index 87a461e..fdab4da 100644 ---

[PATCH] t/watch_maildir: quiet down spam check warning

2016-06-30 Thread Eric Wong
Probably better than bloating our own API with configurable warning streams and such... --- t/watch_maildir.t | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/t/watch_maildir.t b/t/watch_maildir.t index 2138963..3969c80 100644 --- a/t/watch_maildir.t +++ b/t/watch_maildir.t

[PATCH 2/2] examples: add varnish-4.vcl

2016-07-01 Thread Eric Wong
Well, I'm fumbling along with this config. Might as well fumble along with it publically :) --- examples/varnish-4.vcl | 74 ++ 1 file changed, 74 insertions(+) create mode 100644 examples/varnish-4.vcl diff --git a/examples/varnish-4.vcl

[PATCH 0/2] performance-related notes+docs

2016-07-01 Thread Eric Wong
Opposing goals here, yes, I'm hell bent on sticking to a scripting language for hackability and eliminating the need to provide reproducible builds. On the other hand, this should be able to scale to handle LKML. Eric Wong (2): TODO: update documentation for performance items

[PATCH 4/6] www: use PSGI env directly

2016-07-02 Thread Eric Wong
More work on on the Plack::Request/CGI.pm removal front, No need to access the PSGI env through an extra hash lookup. --- lib/PublicInbox/SearchView.pm | 2 +- lib/PublicInbox/WWW.pm| 9 - 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/lib/PublicInbox/SearchView.pm

[PATCH 5/6] view: rely on internal query parser for 'o' param

2016-07-02 Thread Eric Wong
Plack::Request will check the request body by merely calling "param", totally unnecessary and sneaky. --- lib/PublicInbox/View.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm index fd882aa..1527959 100644 ---

[PATCH 3/6] extmsg: rework to use Inbox objects

2016-07-02 Thread Eric Wong
This is less code and hopefully easier-to-understand. --- lib/PublicInbox/ExtMsg.pm | 102 -- lib/PublicInbox/Inbox.pm | 5 +++ 2 files changed, 49 insertions(+), 58 deletions(-) diff --git a/lib/PublicInbox/ExtMsg.pm b/lib/PublicInbox/ExtMsg.pm

[PATCH 2/6] inbox: base_url method takes PSGI env hashref instead

2016-07-02 Thread Eric Wong
This is lighter and we can work further towards eliminating our Plack::Request dependency entirely. --- lib/PublicInbox/Feed.pm | 4 +--- lib/PublicInbox/Inbox.pm | 12 lib/PublicInbox/Mbox.pm | 2 +- lib/PublicInbox/WWW.pm | 2 +- lib/PublicInbox/WwwStream.pm

[PATCH 0/6] misc cleanups

2016-07-02 Thread Eric Wong
Should be pretty obvious, and the iffstat looks good :) Eric Wong (6): TODO: clarify streaming Email::MIME replacement inbox: base_url method takes PSGI env hashref instead extmsg: rework to use Inbox objects www: use PSGI env directly view: rely on internal query

[PATCH 1/6] TODO: clarify streaming Email::MIME replacement

2016-07-02 Thread Eric Wong
I bet there's a billion other improvements to be made elsewhere. --- TODO | 1 + 1 file changed, 1 insertion(+) diff --git a/TODO b/TODO index 30ba38b..644fa03 100644 --- a/TODO +++ b/TODO @@ -53,6 +53,7 @@ all need to be considered for everything we introduce) * streaming Email::MIME

[PATCH 6/6] www: remove Plack::Request dependency entirely

2016-07-02 Thread Eric Wong
Lighter and ever-so-slightly faster! Most importantly, this won't do non-obvious stuff behind our backs like trying to parse a POST request body for a query string param. --- lib/PublicInbox/Feed.pm | 9 + lib/PublicInbox/WWW.pm| 13 + script/public-inbox-httpd | 1 -

[PATCH] linkify: allow '!' in URLs

2016-07-02 Thread Eric Wong
GoogleGroups URLs often contain '!' in them --- lib/PublicInbox/Linkify.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/PublicInbox/Linkify.pm b/lib/PublicInbox/Linkify.pm index 25f0b48..d4df689 100644 --- a/lib/PublicInbox/Linkify.pm +++

[PATCH 0/3] misc NNTP improvements

2016-07-02 Thread Eric Wong
A couple of minor cleanups and shutdown improvement for NNTP. Eric Wong (3): config: introduce each_inbox for iteration nntp: simplify update_idle_time nntp: respect 3 minute idle time for shutdown lib/PublicInbox/Config.pm | 18 ++ lib/PublicInbox/ExtMsg.pm

[PATCH 2/3] nntp: simplify update_idle_time

2016-07-02 Thread Eric Wong
This ought to make things easier when we add TLS support. --- lib/PublicInbox/NNTP.pm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/PublicInbox/NNTP.pm b/lib/PublicInbox/NNTP.pm index 4b116a7..b07e184 100644 --- a/lib/PublicInbox/NNTP.pm +++

[PATCH 3/3] nntp: respect 3 minute idle time for shutdown

2016-07-02 Thread Eric Wong
This avoids breaking clients on graceful shutdown since NNTP responses should usually be quick. --- lib/PublicInbox/NNTP.pm | 15 --- t/nntpd.t | 1 + 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/lib/PublicInbox/NNTP.pm b/lib/PublicInbox/NNTP.pm index

[PATCH] view: remove self-linkification in thread views

2016-07-02 Thread Eric Wong
There is no point for diverting readers' attention with an unnecessary link, here. --- lib/PublicInbox/View.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm index 1527959..e8395ae 100644 --- a/lib/PublicInbox/View.pm +++

[PATCH 0/2] varnish tweaks and such

2016-07-02 Thread Eric Wong
Less configuration and more explanation is better :) Eric Wong (2): examples: remove X-Forwarded-For mentions examples/varnish-4.vcl: comments and tweaks examples/public-inbox.psgi | 2 +- examples/varnish-4.vcl | 34 ++ script/public-inbox.cgi

[PATCH] githttpbackend: match Content-Type of git-http-backend(1)

2016-07-02 Thread Eric Wong
This will allow cache proxies such as Varnish to avoid caching data sent by us. --- lib/PublicInbox/GitHTTPBackend.pm | 22 ++ 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/lib/PublicInbox/GitHTTPBackend.pm b/lib/PublicInbox/GitHTTPBackend.pm index

[PATCH] wwwstream: wording/grammar tweaks in trailer

2016-07-02 Thread Eric Wong
git.git documentation uses "clonable" so that's probably a better term than "clone-able". Also, shorten the section for retrieving our code and remove an obvious typo. --- lib/PublicInbox/WwwStream.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git

[PATCH 2/2] examples/varnish-4.vcl: comments and tweaks

2016-07-02 Thread Eric Wong
Document and simplify things a bit. The major functional change is we no longer waste space caching objects from dumb HTTP clones. --- examples/varnish-4.vcl | 26 ++ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/examples/varnish-4.vcl

[PATCH] address: remove quotes around names

2016-06-19 Thread Eric Wong
They're needless for actual display once outside of email headers. But we will still show them when displaying mock headers in the permalink view. --- lib/PublicInbox/Address.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/PublicInbox/Address.pm

[PATCH 2/7] feed: avoid needless method dispatches on 404

2016-06-19 Thread Eric Wong
We overuse streaming, here. Allow Content-Length to be calculated in this case. --- lib/PublicInbox/Feed.pm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/PublicInbox/Feed.pm b/lib/PublicInbox/Feed.pm index 045e495..d88421b 100644 --- a/lib/PublicInbox/Feed.pm +++

[PATCH 0/2] search: support YYYYMMDD search ranges

2016-08-16 Thread Eric Wong
Not deployed to clear-net sites, yet, I'm reindexing the http://czquwvybam4bgbro.onion/git/ onion right now. Eric Wong (2): search: drop pointless range processors for Unix timestamp search: add MMDD search range via "d:" prefix lib/PublicInbox/Search.

Re: Draft of Git Rev News edition 18

2016-08-16 Thread Eric Wong
Josh Triplett <j...@joshtriplett.org> wrote: > On Tue, Aug 16, 2016 at 09:30:27AM +0000, Eric Wong wrote: > > Jakub Narębski <jna...@gmail.com> wrote: > > > It's a great pity that https://public-inbox.org/ is just > > > directory index, not a true home p

[PATCH] HACKING: minor updates and add to the website

2016-08-16 Thread Eric Wong
Also, at least add one of the Tor mirrors (the rest will be discoverable through the mirrors themselves). --- Documentation/include.mk | 3 ++- HACKING | 19 +++ README | 5 + 3 files changed, 22 insertions(+), 5 deletions(-) diff --git

Re: Working with public-inbox.org [Was: [PATCH] rev-parse: respect core.hooksPath in --git-path]

2016-08-16 Thread Eric Wong
Junio C Hamano wrote: > Stefan Beller writes: > > * Should the public-inbox offer another link to patches 1-n, without > > the cover letter? Or should it add instructions: > > > > If this is a patch series you can apply it locally as: > >

[PATCH] TODO: several updates

2017-02-07 Thread Eric Wong
Always plenty to do while working on this... --- TODO | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/TODO b/TODO index b85887a..3163b8a 100644 --- a/TODO +++ b/TODO @@ -11,15 +11,28 @@ all need to be considered for everything we introduce) * POP3 server,

[PATCH] config: do not slurp lines into memory

2017-02-08 Thread Eric Wong
There's no need to hold everything in memory, here, since apparently "foreach" will read everything at once in array context (for some reason, I thought Perl5 was smart enough to avoid creating a temporary array, here...) --- lib/PublicInbox/Config.pm | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH] searchidx: deal with empty In-Reply-To and References headers

2017-02-06 Thread Eric Wong
In some messages, these headers exist, but have empty values. Do not let empty values throw off our search indexer to tie threads together, as it can make non-sensical threads grouped to a Message-Id of "" (empty string). See

[PATCH 1/3] searchidx: reindex clobbers old thread IDs

2017-02-06 Thread Eric Wong
We cannot always reuse thread IDs since our threading logic may change as bugs are fixed. --- lib/PublicInbox/SearchIdx.pm | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/PublicInbox/SearchIdx.pm b/lib/PublicInbox/SearchIdx.pm index 1142ca7..bc003c6 100644 ---

[PATCH 3/3] search: schema version bump for empty References/In-Reply-To

2017-02-06 Thread Eric Wong
We cannot distinguish between legitimate ghosts and mis-threaded messages before commit 83425ef12e4b65cdcecd11ddcb38175d4a91d5a0 ("searchidx: deal with empty In-Reply-To and References headers") so we must rebuild the index in parallel to fix it. --- lib/PublicInbox/Search.pm | 4 +++- 1 file

[PATCH 0/3] force reindex for threading changes

2017-02-06 Thread Eric Wong
We cannot rely on in-place --reindex to handle thread_id changes when we fix threading bugs in the search indexer like in commit 83425ef12e4b65cdcecd11ddcb38175d4a91d5a0 ("searchidx: deal with empty In-Reply-To and References headers") So, bump the schema version and pay the cost of requiring

[PATCH 2/3] Revert "searchidx: reindex clobbers old thread IDs"

2017-02-06 Thread Eric Wong
Oops, that's broken, too. I guess the only way to reindex after fixing the thread detection is to start from scratch. This reverts commit 5d91adedf5f33ef1cb87df2a86306ddf370b4f8d. --- lib/PublicInbox/SearchIdx.pm | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git

[PATCH] searchview: clarify numeric summary at bottom

2017-02-05 Thread Eric Wong
Xapian can only give estimated results when a result limit is given to it, so make clear it is an estimate to avoid showing non-sensical ranges when no results are returned. --- lib/PublicInbox/SearchView.pm | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git

[PATCH 2/2] add filter for Subject: tags

2017-01-25 Thread Eric Wong
Some mailing lists add annoying tags into the Subject line which discourages readers from doing proper mail organization on the client side. They also waste precious screen space and attention span. Remove them from our archives to reduce clutter. --- MANIFEST | 2

[PATCH 1/2] watchmaildir: allow arguments for filters

2017-01-25 Thread Eric Wong
We'll want to allow some degree of configuration for various mailing lists. --- lib/PublicInbox/WatchMaildir.pm | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/PublicInbox/WatchMaildir.pm b/lib/PublicInbox/WatchMaildir.pm index 0b284bd..1823c24 100644 ---

[PATCH 0/2] -watch: support configurable subject filters

2017-01-25 Thread Eric Wong
lines to reduce clutter when mirroring those archives. Eric Wong (2): watchmaildir: allow arguments for filters add filter for Subject: tags MANIFEST | 2 ++ lib/PublicInbox/Filter/SubjectTag.pm | 33 + lib/PublicInbox

Re: [PATCH] handle repeated References and In-Reply-To headers

2017-02-11 Thread Eric Wong
Eric Wong <e...@80x24.org> wrote: > It seems possible for git-send-email(1) to generate repeated > repeated instances of References and In-Reply-To headers, > as evidenced in: > > https://public-inbox.org/git/2016124541.8216-17-vascomalme...@sapo.pt/raw RFC to fi

[PATCH v2] t/mime: quiet warnings for old versions of Email::Simple

2017-02-11 Thread Eric Wong
This is fixed in the newest versions of Email::Simple, but not the version in Debian jessie (2.203) --- v1 actually broke the intent of the test :x t/mime.t | 1 + 1 file changed, 1 insertion(+) diff --git a/t/mime.t b/t/mime.t index c4bdcf0..b0e2290 100644 --- a/t/mime.t +++ b/t/mime.t @@

[PATCH] handle repeated References and In-Reply-To headers

2017-02-11 Thread Eric Wong
It seems possible for git-send-email(1) to generate repeated repeated instances of References and In-Reply-To headers, as evidenced in: https://public-inbox.org/git/2016124541.8216-17-vascomalme...@sapo.pt/raw This causes a mismatch between how our search indexer threads and how our HTML

[PATCH] t/mime.t: quiet warning during test, at least

2017-02-11 Thread Eric Wong
This is fixed in the newest versions of Email::Simple, but not the version in Debian jessie (2.203) --- t/mime.t | 1 + 1 file changed, 1 insertion(+) diff --git a/t/mime.t b/t/mime.t index c4bdcf0..3e29dbc 100644 --- a/t/mime.t +++ b/t/mime.t @@ -20,6 +20,7 @@ Content-Type: multipart/signed;

Re: Working with public-inbox.org [Was: [PATCH] rev-parse: respect core.hooksPath in --git-path]

2017-02-13 Thread Eric Wong
Arif Khokar wrote: > On 02/13/2017 09:37 AM, Johannes Schindelin wrote: > >I actually had expected *you* to put in a little bit of an effort, too. In > >fact, I was very disappointed that you did not even look into porting that > >script to use public-inbox instead of

[PATCH] www: do not unescape PATH_INFO twice

2017-02-14 Thread Eric Wong
PSGI specs already require PATH_INFO to be unescaped; so our tests were wrong, too. --- lib/PublicInbox/WWW.pm | 2 +- t/cgi.t| 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/PublicInbox/WWW.pm b/lib/PublicInbox/WWW.pm index 430e6b1..62e4ca4 100644 ---

[PATCH] watchmaildir: limit live importer processes

2017-01-18 Thread Eric Wong
We don't want to be triggering OOM or swapping on weaker systems when we have dozens of inboxes as potential targets. --- lib/PublicInbox/WatchMaildir.pm | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/PublicInbox/WatchMaildir.pm b/lib/PublicInbox/WatchMaildir.pm

[PATCH] mime: avoid SUPER usage in Email::MIME subclass

2017-01-18 Thread Eric Wong
We must call Email::Simple methods directly in our monkey patch for Email::MIME to call the intended method. Using SUPER in our subclass would instead hit a different, unintended method in Email::MIME. Reported-by: Junio C Hamano

[PATCH] learn: implement "rm" only functionality

2017-01-18 Thread Eric Wong
Do not consider this interface stable, but I just needed a way to remove mis-imported multipart messages so public-inbox-watch could pick them up again from my Maildir. --- script/public-inbox-learn | 25 ++--- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git

Re: [PATCH v6 4/6] builtin/tag: add --format argument for tag -v

2017-01-18 Thread Eric Wong
Junio C Hamano wrote: > Santiago Torres writes: > > <>??? > > Eric, I've noticed that this message > > > http://public-inbox.org/git/20170118182831.pkhqu2np3bh2puei@LykOS.localdomain/ > > and all messages from Santiago appear empty when they come via >

Re: Mail archives in Git using ssoma

2016-08-21 Thread Eric Wong
"W. Trevor King" <wk...@tremily.us> wrote: > On Sun, Aug 21, 2016 at 06:37:04PM +, Eric Wong wrote: > > Btw, for public-inbox, I'm using git-fast-import now, so imports are > > a bit faster and $GIT_DIR/ssoma.index is no longer used. This was > > crucial f

Re: Mail archives in Git using ssoma (Docker image)

2016-08-21 Thread Eric Wong
"W. Trevor King" <wk...@tremily.us> wrote: > On Sun, Aug 21, 2016 at 12:08:52PM +, Eric Wong wrote: > > "W. Trevor King" <wk...@tremily.us> wrote: > > > This is the ssoma archive (with the data in it). I just set up a > > > ba

Re: Working with public-inbox.org [Was: [PATCH] rev-parse: respect core.hooksPath in --git-path]

2016-08-19 Thread Eric Wong
Johannes Schindelin <johannes.schinde...@gmx.de> wrote: > On Thu, 18 Aug 2016, Eric Wong wrote: > > Johannes Schindelin <johannes.schinde...@gmx.de> wrote: > > > > > Old dogs claim the mail list-approach works for them. Nope. Doesn't. > > > Else you wo

Re: Working with public-inbox.org [Was: [PATCH] rev-parse: respect core.hooksPath in --git-path]

2016-08-19 Thread Eric Wong
Stefan Beller wrote: > Maybe we should invent a patch format that copes with broken whitespace? No redundant new formats, please. MIME attachments are already widely-supported and fine by me. But it's not my call for git. -- unsubscribe: meta+unsubscr...@public-inbox.org

[PATCH 4/4] doc: avoid conflicting with MakeMaker variable names

2016-08-21 Thread Eric Wong
We want the pod2man(1) executable for handling certain options. Also, use the correct year while we're at it :P --- Documentation/include.mk | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Documentation/include.mk b/Documentation/include.mk index

[PATCH 1/4] README: add link to source code mirrors

2016-08-21 Thread Eric Wong
Centralization sucks, so we mirror everything. --- README | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README b/README index 7618727..3235275 100644 --- a/README +++ b/README @@ -88,6 +88,8 @@ Hacking Source code is available via git: git clone https://public-inbox.org/

[PATCH 3/4] avoid spaces after shell redirection operators

2016-08-21 Thread Eric Wong
This makes us closer to git.git style (though I'm not quite sure why we do this...) --- Documentation/include.mk | 4 ++-- Documentation/public-inbox-mda.pod | 2 +- scripts/dc-dlvr| 4 ++-- scripts/dc-dlvr.pre| 6 +++--- scripts/report-spam

Re: Mail archives in Git using ssoma (Docker image)

2016-08-21 Thread Eric Wong
+Cc meta@public-inbox.org "W. Trevor King" wrote: > On Sat, Aug 20, 2016 at 09:36:31PM -0700, W. Trevor King wrote: > > [2]: git://tremily.us/notmuch-archives.git Cool! > This is the ssoma archive (with the data in it). I just set up a > basic HTTP archive (following [1])

Re: Working with public-inbox.org [Was: [PATCH] rev-parse: respect core.hooksPath in --git-path]

2016-08-22 Thread Eric Wong
Johannes Schindelin <johannes.schinde...@gmx.de> wrote: > On Fri, 19 Aug 2016, Eric Wong wrote: > > Johannes Schindelin <johannes.schinde...@gmx.de> wrote: > > > On Thu, 18 Aug 2016, Eric Wong wrote: > > > > Johannes Schindelin <johannes.schinde...@gm

[PATCH] config: use "publicinboxlimiter" prefix

2016-09-02 Thread Eric Wong
Just having "limiter" in the prefix may confuse it with something else. Use the full prefix to avoid this confusion. --- lib/PublicInbox/Config.pm | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/PublicInbox/Config.pm b/lib/PublicInbox/Config.pm index

[PATCH] doc: new docs for user-level commands

2016-09-06 Thread Eric Wong
Hopefully more folks can download and run public-inbox, nowadays. --- .gitignore | 1 + Documentation/.gitignore| 2 +- Documentation/include.mk| 25 - Documentation/public-inbox-config.pod | 151

Re: Draft of Git Rev News edition 18

2016-09-06 Thread Eric Wong
Josh Triplett <j...@joshtriplett.org> wrote: > On Tue, Aug 16, 2016 at 09:27:04PM +0000, Eric Wong wrote: > > As for other projects, I'm not aware of anybody else using it, > > yet. I have some small projects using it, but most of those are > > one-off throwaways and I'

[PATCH 3/3] doc: set release and section properly for manpages

2016-09-01 Thread Eric Wong
This will be important as we will have more of them. --- Documentation/include.mk | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Documentation/include.mk b/Documentation/include.mk index 4583f95..9d2c3b0 100644 --- a/Documentation/include.mk +++

[PATCH 1/3] txt2pre: use public-inbox internal APIs

2016-09-01 Thread Eric Wong
Since this is bundled with the source, we might as well use internal APIs to avoid having duplicate code (and bugs :P) --- Documentation/include.mk | 3 ++- Documentation/txt2pre| 30 ++ 2 files changed, 12 insertions(+), 21 deletions(-) diff --git

[PATCH 2/3] txt2pre: allow overriding title via env

2016-09-01 Thread Eric Wong
This will allow reasonable titles to be generated for manpages. --- Documentation/include.mk | 2 +- Documentation/txt2pre| 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Documentation/include.mk b/Documentation/include.mk index 51a914b..4583f95 100644 ---

[PATCH] watch: use "publicinboxwatch" namespace

2016-09-01 Thread Eric Wong
We'll keep supporting "publicinboxlearn" indefinitely, but "publicinboxwatch" is probably more appropriate at the moment. Noticed while writing documentation. --- lib/PublicInbox/WatchMaildir.pm | 28 1 file changed, 16 insertions(+), 12 deletions(-) diff --git

[PATCH 0/10] search: more mairix prefix compatibility

2016-09-08 Thread Eric Wong
in [PATCH 7/10] to maintain compatibility with Debian 7.x wheezy installs. The in-place reindexing would've been expensive anyways, so perhaps the schema bump is a good idea, anyways, as creating a fresh index should be faster than --reindex. Eric Wong (10): search: allow searching user

[PATCH 02/10] search: drop longer subject: prefix for search

2016-09-08 Thread Eric Wong
We only document the "s:" anyways. While the long name is more descriptive, the ambiguity makes agnostic caching (by Varnish or similar) slightly harder and longer URLs are more likely to be accidentally truncated when shared. --- lib/PublicInbox/Search.pm | 1 - t/search.t| 14

[PATCH] view: handle missing Content-Type in message

2016-09-08 Thread Eric Wong
Email::MIME internally assumes "text/plain" for messages missing a Content-Type, but does not expose that in the Email::MIME::content_type API method. We must assume it ourselves to avoid uninitialized value warnings for the rare (nowadays) MUAs which do not set it. --- lib/PublicInbox/View.pm |

[PATCH] import: hoist out _check_path function

2016-09-08 Thread Eric Wong
This reduces duplication, slightly. We may be using it yet again in a to-be-introduced function (or we may not introduce it). --- lib/PublicInbox/Import.pm | 37 ++--- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/lib/PublicInbox/Import.pm

[PATCH] doc: document PERL_INLINE_DIRECTORY usage

2016-09-08 Thread Eric Wong
For now, we will document this since it allows better performance without the burden of extensions. Perhaps one day far in the future Perl can natively support vfork(2) AND that version of Perl will be widely available, but I suspect that day is at least a decade away, if not two:

[PATCH] TODO: updates for done items

2016-09-09 Thread Eric Wong
The existing string -> number date range Xapian query is good enough, and having too much flexibility is probably bad for caching (as well as increasing our attack surface, because parsing queries is tricky). Tags-as-skiplists are probably not worth the effort given Xapian, and we may have to

[PATCH] nntp: cleanup: move use statements out of sub scope

2016-09-09 Thread Eric Wong
This clarifies the code somewhat, and we don't care to lazy-load in NNTP.pm anyways since this is only used for a long-lived daemon. --- lib/PublicInbox/NNTP.pm | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/PublicInbox/NNTP.pm b/lib/PublicInbox/NNTP.pm index

[PATCH 03/17] thread: pass array refs instead of entire arrays

2016-10-05 Thread Eric Wong
Copying large arrays is expensive, so avoid it. This reduces /$INBOX/ time by around 1%. --- lib/PublicInbox/SearchThread.pm | 25 + lib/PublicInbox/SearchView.pm | 4 ++-- lib/PublicInbox/View.pm | 4 ++-- 3 files changed, 17 insertions(+), 16 deletions(-)

[PATCH 05/17] inbox: deal with ghost smsg

2016-10-05 Thread Eric Wong
smsg will be undef for ghost messages in a subsequent commit --- lib/PublicInbox/Inbox.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/PublicInbox/Inbox.pm b/lib/PublicInbox/Inbox.pm index 414973c..8c63908 100644 --- a/lib/PublicInbox/Inbox.pm +++ b/lib/PublicInbox/Inbox.pm @@ -211,6

[PATCH 10/17] thread: avoid incrementing undefined value

2016-10-05 Thread Eric Wong
It is pointless to increment when setting a true value is simpler as there is no need to read before writing. --- lib/PublicInbox/SearchThread.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/PublicInbox/SearchThread.pm b/lib/PublicInbox/SearchThread.pm index

[PATCH 14/17] thread: use hash + array instead of hand-rolled linked list

2016-10-05 Thread Eric Wong
This starts to show noticeable performance improvements when attempting to thread over 400 messages; but the improvement may not be measurable with less. However, the resulting code is much shorter and (IMHO) much easier to understand. --- MANIFEST| 1 +

[PATCH 13/17] thread: fix sorting without topmost

2016-10-05 Thread Eric Wong
This bug was hidden, and we may not be able to efficiently implement a topmost subroutine with the hash-based (vs linked-list) based container for threading in the next commit. --- lib/PublicInbox/SearchView.pm | 5 ++--- lib/PublicInbox/View.pm | 4 ++-- 2 files changed, 4 insertions(+), 5

[PATCH 16/17] t/thread-cycle: test self-referential messages

2016-10-05 Thread Eric Wong
Some broken (or malicious) mailers may include a generated Message-ID in its References header, so be prepared for it. --- t/thread-cycle.t | 39 +-- 1 file changed, 25 insertions(+), 14 deletions(-) diff --git a/t/thread-cycle.t b/t/thread-cycle.t index

[PATCH 15/17] view: remove redundant children array in thread views

2016-10-05 Thread Eric Wong
Each node has an entire arrayref of its children nowadays, so there's no need to waste time and memory creating another one. --- lib/PublicInbox/View.pm | 63 - 1 file changed, 26 insertions(+), 37 deletions(-) diff --git a/lib/PublicInbox/View.pm

[PATCH 17/17] thread: remove weaken dependency

2016-10-05 Thread Eric Wong
We have to walk through all the messages after threading anyways to build the rootset, so we can just delete all the parent references at that point. --- lib/PublicInbox/SearchThread.pm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/PublicInbox/SearchThread.pm

[PATCH 01/17] view: remove "subject dummy" references

2016-10-05 Thread Eric Wong
We will not care for inexact threading by subject or pruning. --- lib/PublicInbox/View.pm | 8 1 file changed, 8 deletions(-) diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm index 9359209..a3b2681 100644 --- a/lib/PublicInbox/View.pm +++ b/lib/PublicInbox/View.pm @@

<    1   2   3   4   5   6   7   8   9   10   >