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

Re: [PATCH] gpg-interface: Add some output from gpg when it errors out.

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 26, 2017, 02:37 UTC
Message-ID
<xmqq8tpy7dh8.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<20170125235410.byxwmo7o7zdszzot@glandium.org>
Mike Hommey <mh@glandium.org> writes:
Show 14 quoted lines
> On Wed, Jan 25, 2017 at 03:04:38PM -0800, Junio C Hamano wrote:
> ...
>> Overall I think this is a good thing to do.  Instead of eating the
>> status output, showing what we got, especially when we know the
>> command failed, would make the bug-hunting of user's environment
>> easier, like you showed above.
>> 
>> The only thing in the design that makes me wonder is the filtering
>> out based on "[GNUPG:]" prefix.  Why do we need to filter them out?
>
> The [GNUPG:] lines are part of the status-fd protocol. They show details
> that don't really seem interesting to the user. In fact, they even
> contain the signed message (yes, in my case, it turns out gpg was
> actually still signing, but returned an error code...).

OK, that detail was what was missing in the proposed log message. Without that "why do we filter?", readers cannot correctly assess why it is a good idea. I wasn't arguing against filtering it; I just wanted to make sure "git log" readers (and "git show" user after "git blame" identifies this change in the history) will know how we decided to filter lines with the prefix.

With that information recorded in the log (or in-code comment, or both), if it turns out that some lines with the prefix are useful (or some other lines without the prefix are not very useful), they can tweak the filtering criteria as appropriate, with confidence that they _know_ for what purpose the initial "filter lines with the prefix" was trying to serve, and their update is still in the same spirit as the original, only executed better.

Thanks.
Previous: Mike HommeyNext: Mike Hommey
Message 4 of 7 in “gpg-interface: Add some output from gpg when it errors out.”
  1. gpg-interface: Add some output from gpg when it errors out.Mike Hommey, Jan 25, 2017
  2. Junio C HamanoJan 25, 2017
  3. Mike HommeyJan 25, 2017
  4. Junio C HamanoJan 26, 2017
  5. Mike HommeyJan 26, 2017
  6. Junio C HamanoJan 26, 2017
  7. Jeff KingJan 26, 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.