[PATCH v5 6/6] cmd-list.perl: ignore all lines until [commands]
- From
Sébastien Guimmara <sebastien.guimmara@gmail.com>
- Date
- May 9, 2015, 17:17 UTC
- Message-ID
- <1431191856-10949-7-git-send-email-sebastien.guimmara@gmail.com>
- In-Reply-To
- <1431191856-10949-1-git-send-email-sebastien.guimmara@gmail.com>
command-list.txt contains a [common] block that should be ignored by the Documentation checker cmd-list.perl.
Filter out this block before the actual processing of the command list.
Signed-off-by: Sébastien Guimmara <sebastien.guimmara@gmail.com> --- Documentation/cmd-list.perl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/Documentation/cmd-list.perl b/Documentation/cmd-list.perl index 04f9977..d581378 100755 --- a/Documentation/cmd-list.perl +++ b/Documentation/cmd-list.perl @@ -38,8 +38,14 @@ sub format_one { } } +my @filtered = (); +while (<>) +{ + push (@filtered, $_) unless 1../^\[commands\]/; +} + my %cmds = (); -for (sort <>) { +for (sort @filtered) { next if /^#/; chomp;
-- 2.4.0