* Re: [PATCH] config: Consistent call style to gpg settings
[not found] <8C726954D36902459248B0627BF2E66F45D70C3E55@AUSP01VMBX10.collaborationhost.net>
@ 2013-03-27 16:17 ` Junio C Hamano
0 siblings, 0 replies; only message in thread
From: Junio C Hamano @ 2013-03-27 16:17 UTC (permalink / raw)
To: Hans Brigman; +Cc: git@vger.kernel.org, peff@peff.net, Jacob Sarvis
Hans Brigman <hbrigman@openspan.com> writes:
> 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.
> ---
> 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?
^ permalink raw reply [flat|nested] only message in thread