From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id C05181F8C2 for ; Wed, 10 Feb 2021 19:57:59 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 0/2] WWW + "lei q --stdin": support git approxidate Date: Wed, 10 Feb 2021 18:57:57 -0100 Message-Id: <20210210195759.11108-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: 1/2 is something I've wanted since 2015. It could be done in a less janky way if we didn't have to spawn git-rev-parse(1) (libgit2 doesn't expose git__date_parse) AND if we didn't need to support both XS and SWIG Xapian bindings. But it's stable enough performance-wise for now with a single git(1) process that I don't worry about making it public-facing in WWW. I'm not completely sure about 2/2, but I figure lei maintaining consistency with WWW is slightly more important that consistency with git (and git doesn't use mairix-like prefixes :P). I also don't want to muck around too much with how Xapian does quoted phrases Eric Wong (2): search: use git approxidate in WWW and "lei q --stdin" search: disallow spaces in argv approxidate queries lib/PublicInbox/Isearch.pm | 1 + lib/PublicInbox/LeiQuery.pm | 8 +++++++- lib/PublicInbox/Mbox.pm | 1 + lib/PublicInbox/Search.pm | 37 ++++++++++++++++++++++++++--------- lib/PublicInbox/SearchView.pm | 3 ++- t/lei-externals.t | 2 +- t/psgi_search.t | 37 ++++++++++++++++++++--------------- t/search.t | 25 +++++++++++++++++++++++ 8 files changed, 86 insertions(+), 28 deletions(-)