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

Re: [PATCH] status: suppress additional warning output in plumbing modes

From
Torsten Bögershausen <tboegi@web.de>
Date
Jul 1, 2017, 12:49 UTC
Message-ID
<d401dcc7-cb4c-e895-e52a-cd54c8130a65@web.de>
In-Reply-To
<20170630162826.27711-1-sbeller@google.com>
 >On 30/06/17 18:28, Stefan Beller wrote:

The patch makes a lot of sense - thanks for the fast reply. A question: does the header correspond to the patch ?

< [PATCH] status: suppress additional warning output in plumbing modes
 > [PATCH] status: suppress CRLF warnings in porcelain modes
(And may be the comment in the code:)
< / * suppress all additional output in porcelain mode */
 > / * suppress CRLF conversion warnings in porcelain mode */
Show 30 quoted lines
> When status is called with '--porcelain' (as implied by '-z'), we promise
> to output only messages as described in the man page.
> 
> Suppress CRLF warnings.
> 
> Signed-off-by: Stefan Beller <sbeller@google.com>
> ---
> 
> Maybe something like this?
> 
>   builtin/commit.c | 5 +++++
>   1 file changed, 5 insertions(+)
> 
> diff --git a/builtin/commit.c b/builtin/commit.c
> index 00a01f07c3..3705d5ec6f 100644
> --- a/builtin/commit.c
> +++ b/builtin/commit.c
> @@ -1126,6 +1126,11 @@ static void finalize_deferred_config(struct wt_status *s)
>   			die(_("--long and -z are incompatible"));
>   	}
>   
> +	/* suppress all additional output in porcelain mode */
> +	if (status_format == STATUS_FORMAT_PORCELAIN ||
> +	    status_format == STATUS_FORMAT_PORCELAIN_V2)
> +		safe_crlf = SAFE_CRLF_FALSE;
> +
>   	if (use_deferred_config && status_format == STATUS_FORMAT_UNSPECIFIED)
>   		status_format = status_deferred_config.status_format;
>   	if (status_format == STATUS_FORMAT_UNSPECIFIED)
> 
Previous: Stefan BellerNext: Ævar Arnfjörð Bjarmason
Message 6 of 9 in “Bug with automated processing of git status results”
  1. Сергей ШестаковJun 30, 2017
  2. Konstantin KhomoutovJun 30, 2017
  3. Matthieu MoyJun 30, 2017
  4. Torsten BögershausenJun 30, 2017
  5. status: suppress additional warning output in plumbing modesStefan Beller, Jun 30, 2017
  6. Torsten BögershausenJul 1, 2017
  7. Ævar Arnfjörð BjarmasonJul 1, 2017
  8. Junio C HamanoJul 1, 2017
  9. Stefan BellerJul 5, 2017

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.