Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2023-03-18 00:03:10 +0300
committerJunio C Hamano <gitster@pobox.com>2023-03-18 00:03:10 +0300
commitaf5388d2ddb0bc7c22fbe698078f4ca07879d954 (patch)
tree6829523f0d96f2014ea373a7aa5b35cdc3c45420 /builtin/commit-tree.c
parentd0732a8120d9cc62d8b6efa4ec48966f890f84b7 (diff)
parentcc5d1d32fd489f7eb98f762de303b499f2117638 (diff)
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
Diffstat (limited to 'builtin/commit-tree.c')
-rw-r--r--builtin/commit-tree.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/builtin/commit-tree.c b/builtin/commit-tree.c
index fefeed5d4b..e805da5bb1 100644
--- a/builtin/commit-tree.c
+++ b/builtin/commit-tree.c
@@ -38,14 +38,6 @@ static void new_parent(struct commit *parent, struct commit_list **parents_p)
commit_list_insert(parent, 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);
-}
-
static int parse_parent_arg_callback(const struct option *opt,
const char *arg, int unset)
{
@@ -122,7 +114,7 @@ int cmd_commit_tree(int argc, const char **argv, const char *prefix)
OPT_END()
};
- git_config(commit_tree_config, NULL);
+ git_config(git_default_config, NULL);
if (argc < 2 || !strcmp(argv[1], "-h"))
usage_with_options(commit_tree_usage, options);