git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jonathan Nieder <jrnieder@gmail.com>
To: Stefan Beller <sbeller@google.com>
Cc: gitster@pobox.com, git@vger.kernel.org, masayasuzuki@google.com
Subject: Re: [PATCH] builtin/send-pack: report gpg config errors
Date: Tue, 12 Jun 2018 11:07:05 -0700	[thread overview]
Message-ID: <20180612180705.GA28554@aiede.svl.corp.google.com> (raw)
In-Reply-To: <20180612175344.65466-1-sbeller@google.com>

Hi,

Stefan Beller wrote:

> Any caller except of git_gpg_config() except the one in send_pack_config()
> handles the return value of git_gpg_config(). Also handle the return value
> there.
>
> Signed-off-by: Stefan Beller <sbeller@google.com>
> ---
>  builtin/send-pack.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

The other callers do

	int status;

	if (!strcmp(k, "key.i.handle")) {
		...
		return ...;
	}
	return git_gpg_config(k, v, NULL);

or

	int status;

	if (!strcmp(k, "key.i.handle")) {
		...
		return ...;
	}

	status = git_gpg_config(k, v, NULL);
	if (status)
		return status;
	...

Should this do the same?  That way, if config_fn_t learns to return
more fine-grained errors (e.g. a new return value of -2 or 1) then it
would be propagated.

Thanks,
Jonathan

  parent reply	other threads:[~2018-06-12 18:09 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-12 17:26 [PATCH] builtin/send-pack: populate the default configs Masaya Suzuki
2018-06-12 17:38 ` Junio C Hamano
2018-06-12 17:53   ` [PATCH] builtin/send-pack: report gpg config errors Stefan Beller
2018-06-12 17:55     ` Eric Sunshine
2018-06-12 18:07     ` Jonathan Nieder [this message]
2018-06-12 18:19       ` Stefan Beller
2018-06-12 18:16 ` [PATCH] builtin/send-pack: populate the default configs Jonathan Nieder
2018-06-12 18:22   ` Eric Sunshine

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180612180705.GA28554@aiede.svl.corp.google.com \
    --to=jrnieder@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=masayasuzuki@google.com \
    --cc=sbeller@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).