Re: [PATCH] config: Consistent call style to gpg settings
From: Junio C Hamano <hidden>
Date: 2016-06-15 22:56:32
Hans Brigman [off-list ref] writes:
From: Jacob Sarvis <redacted> 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 <redacted>
Exactly the same comments as the review for the other patch apply here.
quoted hunk
--- 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?