git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] lint-gitlink: don't use empty lower bound in .{0,8}

From
Tuomas Ahola <taahol@utu.fi>
Date
Sep 7, 2026, 18:48 UTC
Message-ID
<20260907184858.13475-1-taahol@utu.fi>

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: Junio C Hamano
Message 1 of 3 in “lint-gitlink: don't use empty lower bound in .{0,8}”
  1. lint-gitlink: don't use empty lower bound in .{0,8}Tuomas Ahola, Sep 7, 2026
  2. Junio C HamanoSep 8, 2026
  3. Tuomas AholaSep 8, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.