summaryrefslogtreecommitdiffstats
path: root/generate-cmdlist.sh
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2019-04-18 15:16:40 +0200
committerJunio C Hamano <gitster@pobox.com>2019-04-19 07:03:24 +0200
commit724d63569fe64944efd1c5a24455a0f578d33cba (patch)
treee5b70f21750a990865366ec8b549a590a80ec57a /generate-cmdlist.sh
parentMakefile: drop the NO_INSTALL variable (diff)
downloadgit-724d63569fe64944efd1c5a24455a0f578d33cba.tar.xz
git-724d63569fe64944efd1c5a24455a0f578d33cba.zip
help -a: do not list commands that are excluded from the build
When built with NO_CURL or with NO_UNIX_SOCKETS, some commands are skipped from the build. It does not make sense to list them in the output of `git help -a`, so let's just not. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'generate-cmdlist.sh')
-rwxr-xr-xgenerate-cmdlist.sh10
1 files changed, 9 insertions, 1 deletions
diff --git a/generate-cmdlist.sh b/generate-cmdlist.sh
index 709d67405b..71158f7d8b 100755
--- a/generate-cmdlist.sh
+++ b/generate-cmdlist.sh
@@ -6,7 +6,7 @@ die () {
}
command_list () {
- grep -v '^#' "$1"
+ eval "grep -ve '^#' $exclude_programs" <"$1"
}
get_categories () {
@@ -93,6 +93,14 @@ EOF
EOF
}
+exclude_programs=
+while test "--exclude-program" = "$1"
+do
+ shift
+ exclude_programs="$exclude_programs -e \"^$1 \""
+ shift
+done
+
echo "/* Automatically generated by generate-cmdlist.sh */
struct cmdname_help {
const char *name;