diff options
author | Junio C Hamano <gitster@pobox.com> | 2023-02-09 21:24:14 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-02-10 02:01:27 +0100 |
commit | fd2d4c135ed974fdddf2af687748d28c58575984 (patch) | |
tree | e18cf51b6539a7517925f237ee76c8f84b57c5a1 /builtin/pull.c | |
parent | The fourteenth batch (diff) | |
download | git-fd2d4c135ed974fdddf2af687748d28c58575984.tar.xz git-fd2d4c135ed974fdddf2af687748d28c58575984.zip |
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 <gitster@pobox.com>
Diffstat (limited to 'builtin/pull.c')
-rw-r--r-- | builtin/pull.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/builtin/pull.c b/builtin/pull.c index 1ab4de0005..4367727db6 100644 --- a/builtin/pull.c +++ b/builtin/pull.c @@ -359,8 +359,6 @@ static enum rebase_type config_get_rebase(int *rebase_unspecified) */ static int git_pull_config(const char *var, const char *value, void *cb) { - int status; - if (!strcmp(var, "rebase.autostash")) { config_autostash = git_config_bool(var, value); return 0; @@ -372,10 +370,6 @@ static int git_pull_config(const char *var, const char *value, void *cb) check_trust_level = 0; } - status = git_gpg_config(var, value, cb); - if (status) - return status; - return git_default_config(var, value, cb); } |