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=-3.9 required=3.0 tests=ALL_TRUSTED,AWL,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 D4FD31F4B4; Sat, 26 Dec 2020 12:30:35 +0000 (UTC) Date: Sat, 26 Dec 2020 12:30:35 +0000 From: Eric Wong To: Ali Alnubani Cc: meta@public-inbox.org Subject: [PATCH] t/config: test --get-urlmatch for git <2.26 Message-ID: <20201226123035.GB24392@dcvr> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: List-Id: Ali Alnubani wrote: > t/config.t ................... 1/? > # Failed test 'urlmatch hit' > # at t/config.t line 249. > # got: undef > # expected: '9' > # Looks like you failed 1 test of 95. Just fixing the test, for now; I guess -watch documentation could use some updates or the code updated to not depend on git for URL matching at all (it's not in libgit2, either, but wildcard => Perl regexp translation isn't too bad, and we'll be needing it elsewhere, I think) ----------8<--------- Subject: [PATCH] t/config: test --get-urlmatch for git <2.26 While git 1.8.5 learned --get-urlmatch, git did not learn to match URLs against wildcards until 2.26. So only depend on 1.8.5 for this test since 2.26 is too new. Reported-by: Ali Alnubani Link: https://public-inbox.org/meta/DM6PR12MB49106F8E3BD697B63B943A22DADB0@DM6PR12MB4910.namprd12.prod.outlook.com/ --- t/config.t | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/t/config.t b/t/config.t index 99a7fef4..7fb44acc 100644 --- a/t/config.t +++ b/t/config.t @@ -234,12 +234,13 @@ EOF } SKIP: { + # XXX wildcard match requires git 2.26+ require_git('1.8.5', 2) or skip 'git 1.8.5+ required for --url-match', 2; my $f = "$tmpdir/urlmatch"; open my $fh, '>', $f or BAIL_OUT $!; print $fh <