Re: [PATCH v8 09/15] bugreport: generate config safelist based on docs
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 20, 2020, 20:40 UTC
- Message-ID
- <xmqqmu9d9elo.fsf@gitster-ct.c.googlers.com>
- In-Reply-To
- <20200220015858.181086-10-emilyshaffer@google.com>
Emily Shaffer <emilyshaffer@google.com> writes:
Show 6 quoted lines
> --- /dev/null > +++ b/generate-bugreport-config-safelist.sh > @@ -0,0 +1,18 @@ > +#!/bin/sh > + > +cat <<EOF
Quote the EOF if you are not doing parameter expansion in HERE-DOC.
Show 12 quoted lines
> +/* Automatically generated by bugreport-generate-config-safelist.sh */
> +
> +
> +static const char *bugreport_config_safelist[] = {
> +EOF
> +
> +# cat all regular files in Documentation/config
> +find Documentation/config -type f -exec cat {} \; |
> +# print the command name which matches the annotate-bugreport macro
> +sed -n 's/^\([^ ]*\) *annotate:bugreport\[include\].* ::$/ "\1",/p' \
> + | sort
> +End the first line with a pipe '|' instead of a backslash, and lose the pipe from the beginning of the second line.
> +cat <<EOF > +}; > +EOF