From: Junio C Hamano Date: Thu, 20 Feb 2020 20:40:51 GMT Subject: Re: [PATCH v8 09/15] bugreport: generate config safelist based on docs Message-ID: In-Reply-To: <20200220015858.181086-10-emilyshaffer@google.com> Emily Shaffer writes: > --- /dev/null > +++ b/generate-bugreport-config-safelist.sh > @@ -0,0 +1,18 @@ > +#!/bin/sh > + > +cat < +/* 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