From fd2d4c135ed974fdddf2af687748d28c58575984 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Thu, 9 Feb 2023 12:24:14 -0800 Subject: gpg-interface: lazily initialize and read the configuration Instead of forcing the porcelain commands to always read the configuration variables related to the signing and verifying signatures, lazily initialize the necessary subsystem on demand upon the first use. This hopefully would make it more future-proof as we do not have to think and decide whether we should call git_gpg_config() in the git_config() callback for each command. A few git_config() callback functions that used to be custom callbacks are now just a thin wrapper around git_default_config(). We could further remove, git_FOO_config and replace calls to git_config(git_FOO_config) with git_config(git_default_config), but to make it clear which ones are affected and the effect is only the removal of git_gpg_config(), it is vastly preferred not to do such a change in this step (they can be done on top once the dust settled). Signed-off-by: Junio C Hamano --- builtin/commit-tree.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'builtin/commit-tree.c') diff --git a/builtin/commit-tree.c b/builtin/commit-tree.c index cc8d584be2..f6a099d601 100644 --- a/builtin/commit-tree.c +++ b/builtin/commit-tree.c @@ -39,9 +39,6 @@ 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; return git_default_config(var, value, cb); } -- cgit 1.2.3-korg