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

Re: silent_exec_failure when calling gpg

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 11, 2018, 04:09 UTC
Message-ID
<xmqqh8fkln5q.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<xmqqlg4wlocc.fsf@gitster-ct.c.googlers.com>
Junio C Hamano <gitster@pobox.com> writes:
Show 12 quoted lines
> John Passaro <john.a.passaro@gmail.com> writes:
>
>> I've noticed that in v2.19.1, when using git to pretty print
>> information about the signature, if git cannot find gpg (e.g. "git
>> config gpg.program nogpg"), it prints an error to stderr:
>>
>> $ git show -s --pretty=%G?
>> fatal: cannot run nogpg: No such file or directory
>> N
>
> I think the uninteded behaviour change was in 17809a98 ("Merge
> branch 'jk/run-command-notdot'", 2018-10-30).

Perhaps something like this. There needs an additional test added for this codepath, which I haven't done yet, though.

 run-command.c | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/run-command.c b/run-command.c
index d679cc267c..e2bc18a083 100644
--- a/run-command.c
+++ b/run-command.c
@@ -728,6 +728,8 @@ int start_command(struct child_process *cmd)
 	if (prepare_cmd(&argv, cmd) < 0) {
 		failed_errno = errno;
 		cmd->pid = -1;
+		if (!cmd->silent_exec_failure)
+			error_errno("cannot run %s", cmd->argv[0]);
 		goto end_of_spawn;
 	}
 
Previous: Junio C HamanoNext: Jeff King
Message 3 of 4 in “silent_exec_failure when calling gpg”
  1. John PassaroDec 10, 2018
  2. Junio C HamanoDec 11, 2018
  3. Junio C HamanoDec 11, 2018
  4. Jeff KingDec 11, 2018

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.