Git fork

doc: test linkgit macros for well-formedness

Some readers of man pages have reported that they found
malformed linkgit macros in the documentation (absence or bad
spelling).

Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

authored by

Jean-Noël Avila and committed by
Junio C Hamano
f81a574f 721c9e5c

+8 -1
+1 -1
Documentation/gitweb.conf.adoc
··· 178 178 Show repository only if this file exists (in repository). Only 179 179 effective if this variable evaluates to true. Can be set when 180 180 building gitweb by setting `GITWEB_EXPORT_OK`. This path is 181 - relative to `GIT_DIR`. git-daemon[1] uses 'git-daemon-export-ok', 181 + relative to `GIT_DIR`. linkgit:git-daemon[1] uses 'git-daemon-export-ok', 182 182 unless started with `--export-all`. By default this variable is 183 183 not set, which means that this feature is turned off. 184 184
+7
Documentation/lint-gitlink.perl
··· 41 41 @ARGV = $to_check; 42 42 while (<>) { 43 43 my $line = $_; 44 + while ($line =~ m/(.{,8})((git[-a-z]+|scalar)\[(\d)*\])/g) { 45 + my $pos = pos $line; 46 + my ($macro, $target, $page, $section) = ($1, $2, $3, $4); 47 + if ( $macro ne "linkgit:" && $macro !~ "ifn?def::" && $macro ne "endif::" ) { 48 + report($pos, $line, $target, "linkgit: macro expected"); 49 + } 50 + } 44 51 while ($line =~ m/linkgit:((.*?)\[(\d)\])/g) { 45 52 my $pos = pos $line; 46 53 my ($target, $page, $section) = ($1, $2, $3);