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-ASN: 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 5668321426 for ; Wed, 30 Jan 2019 04:44:33 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 11/11] solvergit: deal with alternative diff prefixes Date: Wed, 30 Jan 2019 04:44:30 +0000 Message-Id: <20190130044430.28189-12-e@80x24.org> In-Reply-To: <20190130044430.28189-1-e@80x24.org> References: <20190130044430.28189-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: At least, without extra directory levels, since git-diff supports --src-prefix and --dst-prefix, and /git/6aa8857a11/s/ uses it... --- lib/PublicInbox/SolverGit.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/PublicInbox/SolverGit.pm b/lib/PublicInbox/SolverGit.pm index d9b312c..d787533 100644 --- a/lib/PublicInbox/SolverGit.pm +++ b/lib/PublicInbox/SolverGit.pm @@ -131,7 +131,7 @@ sub extract_diff ($$$$$) { # for debugging/diagnostics: $di->{ibx} = $ibx; $di->{smsg} = $smsg; - } elsif ($l =~ m!\Adiff --git ("?a/.+) ("?b/.+)$!) { + } elsif ($l =~ m!\Adiff --git ("?[^/]+/.+) ("?[^/]+/.+)$!) { last if $tmp; # got our blob, done! my ($path_a, $path_b) = ($1, $2); -- EW