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 56D2B1F5B7 for ; Tue, 7 Jul 2020 20:37:39 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 3/5] viewvcs: stop checking unused "B" query parameter Date: Tue, 7 Jul 2020 20:37:36 +0000 Message-Id: <20200707203738.32677-4-e@yhbt.net> In-Reply-To: <20200707203738.32677-1-e@yhbt.net> References: <20200707203738.32677-1-e@yhbt.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: The resulting OID ("oid_b") is a required arg and part of $env->{PATH_INFO}, instead; so it's never part of an optional query parameter. --- lib/PublicInbox/SolverGit.pm | 2 +- lib/PublicInbox/ViewVCS.pm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/PublicInbox/SolverGit.pm b/lib/PublicInbox/SolverGit.pm index b1cb1ae97..ddf5fa16b 100644 --- a/lib/PublicInbox/SolverGit.pm +++ b/lib/PublicInbox/SolverGit.pm @@ -594,7 +594,7 @@ sub new { } # recreate $oid_want using $hints -# hints keys: path_a, path_b, oid_a +# hints keys: path_a, path_b, oid_a (note: `oid_b' is NOT a hint) # Calls {user_cb} with: [ ::Git object, oid_full, type, size, di (diff_info) ] # with found object, or undef if nothing was found # Calls {user_cb} with a string error on fatal errors diff --git a/lib/PublicInbox/ViewVCS.pm b/lib/PublicInbox/ViewVCS.pm index 053848a8b..87927d5ea 100644 --- a/lib/PublicInbox/ViewVCS.pm +++ b/lib/PublicInbox/ViewVCS.pm @@ -27,7 +27,7 @@ my $hl = eval { PublicInbox::HlMod->new; }; -my %QP_MAP = ( A => 'oid_a', B => 'oid_b', a => 'path_a', b => 'path_b' ); +my %QP_MAP = ( A => 'oid_a', a => 'path_a', b => 'path_b' ); our $MAX_SIZE = 1024 * 1024; # TODO: configurable my $BIN_DETECT = 8000; # same as git