threads / patch / 33303

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

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

## tl;dr

One message between Mar 27, 2013 and Mar 27, 2013. Diffs are folded; open one to read it.

replies: 0people: 1as markdown or json

Junio C Hamano· Mar 27, 2013, 16:17 UTC · lore
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?

← back to recent threads