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

Re: [PATCH 2/2] gpg: do show gpg's error message upon failure

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 15, 2023, 17:20 UTC
Message-ID
<xmqqzg9ezvyo.fsf@gitster.g>
In-Reply-To
<ead90d343b1f4f4ce8998b2f31558fd30d7d2675.1676440714.git.gitgitgadget@gmail.com>

"Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com> writes:

Show 10 quoted lines
>  	ret |= !cp;
> +	if (ret) {
> +		error(_("gpg failed to sign the data:\n%s"),
> +		      gpg_status.len ? gpg_status.buf : "(no gpg output)");
> +		strbuf_release(&gpg_status);
> +		return -1;
> +	}
>  	strbuf_release(&gpg_status);
> -	if (ret)
> -		return error(_("gpg failed to sign the data"));

Good. As we are worried about error messages that are too terse, dumping everything to the output would be a vast improvement. Hopefully gpg_status.len would to be thousands of bytes long, and this is not a codepath that is triggered remotely anyway.

Will queue.  Thanks.
Previous: Johannes Schindelin via GitGitGadgetNext: Johannes Schindelin via GitGitGadget
Message 3 of 4 in “Make GPG errors less puzzling”
  1. 0/2 Make GPG errors less puzzlingJohannes Schindelin via GitGitGadget, Feb 15, 2023
  2. 2/2 gpg: do show gpg's error message upon failureJohannes Schindelin via GitGitGadget, Feb 15, 2023
  3. Junio C HamanoFeb 15, 2023
  4. 1/2 t7510: add a test case that does not need gpgJohannes Schindelin via GitGitGadget, Feb 15, 2023

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.