From ad228c24df15e96f98737a9751a455e278b62fcb Mon Sep 17 00:00:00 2001 From: "D. Ben Knoble" Date: Tue, 20 Jan 2026 09:05:57 -0500 Subject: [PATCH 1/2] replay: drop rev-list formatting options from manual MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The rev-list options in our manuals are quite long; git-replay's manual is no exception. Since replay doesn't use the formatting options at all (it has its own output format), drop them. This is the first time we have needed compound tests [1] for if[n]def in our documentation: git grep '^ifn\?def::' Documentation | grep '[,+]' [1]: https://docs.asciidoctor.org/asciidoc/latest/directives/ifdef-ifndef/ For both ifdef and ifndef, the "," takes on the intuitive meaning: - ifdef: if any of the listed attributes are set… - ifndef: unless any of the listed attributes are set (Use "+" for "all".) Signed-off-by: D. Ben Knoble Signed-off-by: Junio C Hamano --- Documentation/git-replay.adoc | 1 + Documentation/rev-list-options.adoc | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Documentation/git-replay.adoc b/Documentation/git-replay.adoc index 4c61f3aa1f..c3b214ec69 100644 --- a/Documentation/git-replay.adoc +++ b/Documentation/git-replay.adoc @@ -64,6 +64,7 @@ The default mode can be configured via the `replay.refAction` configuration vari range should have a single tip, so that it's clear to which tip the advanced should point. +:git-replay: 1 include::rev-list-options.adoc[] [[output]] diff --git a/Documentation/rev-list-options.adoc b/Documentation/rev-list-options.adoc index 453ec59057..c4d7a6b989 100644 --- a/Documentation/rev-list-options.adoc +++ b/Documentation/rev-list-options.adoc @@ -1096,7 +1096,7 @@ endif::git-rev-list[] Overrides a previous `--no-walk`. endif::git-shortlog[] -ifndef::git-shortlog[] +ifndef::git-shortlog,git-replay[] Commit Formatting ~~~~~~~~~~~~~~~~~ @@ -1265,4 +1265,4 @@ ifdef::git-rev-list[] counts and print the count for equivalent commits separated by a tab. endif::git-rev-list[] -endif::git-shortlog[] +endif::git-shortlog,git-replay[] From 46933bf1825eb436b8e3ae6aba067344e0a8bfae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-No=C3=ABl=20Avila?= Date: Wed, 21 Jan 2026 14:27:05 +0100 Subject: [PATCH 2/2] lint-gitlink: preemptively ignore all /ifn?def|endif/ macros MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Instead of testing if the macro name is ifn?def:: as if it were a inline macro, it is faster and safer to just ignore such block macro lines before hand. Signed-off-by: Jean-Noël Avila Signed-off-by: Junio C Hamano --- Documentation/lint-gitlink.perl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Documentation/lint-gitlink.perl b/Documentation/lint-gitlink.perl index f183a18df2..a92e887b4c 100755 --- a/Documentation/lint-gitlink.perl +++ b/Documentation/lint-gitlink.perl @@ -41,10 +41,11 @@ die "BUG: No list of valid linkgit:* files given" unless @ARGV; @ARGV = $to_check; while (<>) { my $line = $_; + next if $line =~ /^\s*(ifn?def|endif)::/; while ($line =~ m/(.{,8})((git[-a-z]+|scalar)\[(\d)*\])/g) { my $pos = pos $line; my ($macro, $target, $page, $section) = ($1, $2, $3, $4); - if ( $macro ne "linkgit:" && $macro !~ "ifn?def::" && $macro ne "endif::" ) { + if ( $macro ne "linkgit:" ) { report($pos, $line, $target, "linkgit: macro expected"); } }