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

Re: [PATCH] config: Consistent call style to gpg settings

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 27, 2013, 16:17 UTC
Message-ID
<7vehf0olzh.fsf@alter.siamese.dyndns.org>
In-Reply-To
<8C726954D36902459248B0627BF2E66F45D70C3E55@AUSP01VMBX10.collaborationhost.net>
Hans Brigman <hbrigman@openspan.com> writes:
Show 10 quoted lines
> From: Jacob Sarvis <jsarvis@openspan.com>
>
> config: Consistent call style to gpg settings
>
> Calling style for passing settings to git_gpg_config is inconsistent
> between commit-tree, commit, merge, tag, and verify-tag.
>
> Consolidate style of calling git_gpg_config.
>
> Signed-off-by: Hans Brigman <hbrigman@openspan.com>
Exactly the same comments as the review for the other patch apply here.
Show 22 quoted lines
> ---
> builtin/commit-tree.c |  5 ++---
> builtin/commit.c      |  6 ++----
> builtin/merge.c       | 12 ++++--------
> builtin/tag.c         |  5 ++---
> builtin/verify-tag.c  |  5 ++---
> 5 files changed, 12 insertions(+), 21 deletions(-)
>
> diff --git a/builtin/commit-tree.c b/builtin/commit-tree.c
> index eac901a..45e0152 100644
> --- a/builtin/commit-tree.c
> +++ b/builtin/commit-tree.c
> @@ -28,9 +28,8 @@ static void new_parent(struct commit *parent, struct commit_list **parents_p)
>  static int commit_tree_config(const char *var, const char *value, void *cb)
> {
> -              int status = git_gpg_config(var, value, NULL);
> -              if (status)
> -                              return status;
> +             if (git_gpg_config(var, value, cb) < 0)
> +                             return -1;
>                return git_default_config(var, value, cb);
> }

Earlier, we always returned what the underlying helper returned, but in this version, we ignore error return values from git_gpg_config() but honor error return values from git_default_config().

This is making things worse, no?
Message 1 of 1 in “Re: [PATCH] config: Consistent call style to gpg settings”
  1. Junio C HamanoMar 27, 2013

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.