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

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

From
Stefan Beller <sbeller@google.com>
Date
Jul 5, 2017, 18:53 UTC
Message-ID
<CAGZ79kZedckynRcBTGVOAJO_iNrrBR0eAo3XvBaW+LUbOJXQXA@mail.gmail.com>
In-Reply-To
<xmqqk23snjpm.fsf@gitster.mtv.corp.google.com>
On Sat, Jul 1, 2017 at 10:35 AM, Junio C Hamano <gitster@pobox.com> wrote:
Show 16 quoted lines
> Stefan Beller <sbeller@google.com> writes:
>
>> 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?
>
> This looks to me like a stimulus having enough time to go to the
> spinal cord to induce a knee-jerk reaction, without giving a chance
> to the brain to think things through.
>
sort of.
> Surely the reported symptom may have only been about CRLF, but who
> says that would be the only kind of warning that would be seen
> during "status --porcelain" codepath?
I was slightly worried about this, too.
Show 11 quoted lines
>
> I tend to agree with Ævar's "output for the script can be read from
> our standard output" should probably be our first response.
>
> The patch _is_ a good start to document that we may want to do
> something differently under _PORCELAIN output modes and one location
> in the code that may be a good place to make that decision, but if
> we are to squelch the warnings, we should make sure we do not give
> any warning, not limited to squelching the safe-crlf warning, to the
> standard error, but still diagnose errors and show error messages,
> or something like that, I would think.

So for now we'd rather want to go with a documentation patch first and then the refinement of the porcelain mode of potentially suppressing more warnings?

Note that this patch was a one-off by me, so I no longer pursue fixing the problem here, someone else is kindly asked to step up.

Thanks, Stefan

Previous: Junio C Hamano
Message 9 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.