Merge branch 'jc/gpg-lazy-init'

Instead of forcing each command to choose to honor GPG related
configuration variables, make the subsystem lazily initialize
itself.

* jc/gpg-lazy-init:
  drop pure pass-through config callbacks
  gpg-interface: lazily initialize and read the configuration
This commit is contained in:
Junio C Hamano
2023-03-17 14:03:10 -07:00
17 changed files with 37 additions and 81 deletions

View File

@ -20,8 +20,6 @@ static struct string_list suppress_dest_patterns = STRING_LIST_INIT_DUP;
int fmt_merge_msg_config(const char *key, const char *value, void *cb)
{
int status = 0;
if (!strcmp(key, "merge.log") || !strcmp(key, "merge.summary")) {
int is_bool;
merge_log_config = git_config_bool_or_int(key, value, &is_bool);
@ -40,9 +38,6 @@ int fmt_merge_msg_config(const char *key, const char *value, void *cb)
string_list_append(&suppress_dest_patterns, value);
suppress_dest_pattern_seen = 1;
} else {
status = git_gpg_config(key, value, NULL);
if (status)
return status;
return git_default_config(key, value, cb);
}
return 0;