From: Tuomas Ahola <taahol@utu.fi>
To: <git@vger.kernel.org>
Cc: Tuomas Ahola <taahol@utu.fi>
Subject: [PATCH] lint-gitlink: don't use empty lower bound in .{0,8}
Date: Mon, 7 Sep 2026 21:48:58 +0300 [thread overview]
Message-ID: <20260907184858.13475-1-taahol@utu.fi> (raw)
The regex quantifier {,n} was added in Perl 5.34.0 as a shorthand
for {0,n}. That makes it too new an introduction for Git which
targets Perl 5.26.0.
Even though Documentation/lint-gitlink.perl is a development helper
script, let's stick to the general Perl version requirement for
consistency, and use an explicit zero in .{0,8}.
Signed-off-by: Tuomas Ahola <taahol@utu.fi>
---
Documentation/lint-gitlink.perl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/lint-gitlink.perl b/Documentation/lint-gitlink.perl
index a92e887b4c..6a87633dd4 100755
--- a/Documentation/lint-gitlink.perl
+++ b/Documentation/lint-gitlink.perl
@@ -42,7 +42,7 @@ sub report {
while (<>) {
my $line = $_;
next if $line =~ /^\s*(ifn?def|endif)::/;
- while ($line =~ m/(.{,8})((git[-a-z]+|scalar)\[(\d)*\])/g) {
+ while ($line =~ m/(.{0,8})((git[-a-z]+|scalar)\[(\d)*\])/g) {
my $pos = pos $line;
my ($macro, $target, $page, $section) = ($1, $2, $3, $4);
if ( $macro ne "linkgit:" ) {
base-commit: e9019fcafe0040228b8631c30f97ae1adb61bcdc
--
ta/lint-gitlink-perl-regex-nit
next reply other threads:[~2026-09-07 18:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-07 18:48 Tuomas Ahola [this message]
2026-09-08 3:37 ` [PATCH] lint-gitlink: don't use empty lower bound in .{0,8} Junio C Hamano
2026-09-08 6:43 ` Tuomas Ahola
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260907184858.13475-1-taahol@utu.fi \
--to=taahol@utu.fi \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox