mirror of
https://github.com/git/git.git
synced 2026-01-09 01:34:00 +00:00
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>
This commit is contained in:
committed by
Junio C Hamano
parent
0b64e21cc2
commit
724d63569f
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user