git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 1/2] bugreport: generate config safelist based on docs

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 24, 2020, 04:35 UTC
Message-ID
<xmqq4kr19j3w.fsf@gitster.c.googlers.com>
In-Reply-To
<20200624012827.34126-2-emilyshaffer@google.com>
Emily Shaffer <emilyshaffer@google.com> writes:
> ... To mark a config as safe,
> add "annotate:bugreport[include]" to the corresponding line in the
> config documentation; to mark it as unsafe, add
> "annotate:bugreport[exclude]" instead.
Hmph,...
Show 11 quoted lines
> -sendemail.smtpEncryption::
> +sendemail.smtpEncryption annotate:bugreport[include] ::
>  	See linkgit:git-send-email[1] for description.  Note that this
>  	setting is not subject to the 'identity' mechanism.
>  
> @@ -15,7 +15,7 @@ sendemail.smtpsslcertpath::
>  	Path to ca-certificates (either a directory or a single file).
>  	Set it to an empty string to disable certificate verification.
>  
> -sendemail.<identity>.*::
> +sendemail.<identity>.* annotate:bugreport[exclude] ::

So "sendemail.git-devel.cc" is not included due to [exclude] here, but ...

> +sendemail.annotate annotate:bugreport[include] ::
> +sendemail.bcc annotate:bugreport[include] ::
> +sendemail.cc annotate:bugreport[include] ::

... "sendemail.cc" that is a fallback value for other "sendemail.*.cc" is included?

Show 16 quoted lines
> +++ b/generate-bugreport-config-safelist.sh
> @@ -0,0 +1,18 @@
> +#!/bin/sh
> +
> +cat <<"EOF"
> +/* 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

We just care about "include" entries, so it does not matter whether we mark entries with [exclude] or not anyway?

Puzzled...
Previous: Emily ShafferNext: Emily Shaffer
Message 3 of 5 in “bugreport: report configs from safelist”
  1. 0/2 bugreport: report configs from safelistEmily Shaffer, Jun 24, 2020
  2. 1/2 bugreport: generate config safelist based on docsEmily Shaffer, Jun 24, 2020
  3. Junio C HamanoJun 24, 2020
  4. Emily ShafferJun 24, 2020
  5. 2/2 bugreport: add config values from safelistEmily Shaffer, Jun 24, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.