From cc5d1d32fd489f7eb98f762de303b499f2117638 Mon Sep 17 00:00:00 2001 From: Jeff King Date: Sun, 26 Feb 2023 17:40:46 -0500 Subject: drop pure pass-through config callbacks Commit fd2d4c135e (gpg-interface: lazily initialize and read the configuration, 2023-02-09) shrunk a few custom config callbacks so that they are just one-liners of: return git_default_config(...); We can drop them entirely and replace them direct calls of git_default_config() intead. This makes the code a little shorter and easier to understand (with the downside being that if they do grow custom options again later, we'll have to recreate the functions). Signed-off-by: Jeff King Signed-off-by: Junio C Hamano --- builtin/commit-tree.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'builtin/commit-tree.c') diff --git a/builtin/commit-tree.c b/builtin/commit-tree.c index f6a099d601..c0bbe9373d 100644 --- a/builtin/commit-tree.c +++ b/builtin/commit-tree.c @@ -37,11 +37,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) -{ - return git_default_config(var, value, cb); -} - static int parse_parent_arg_callback(const struct option *opt, const char *arg, int unset) { @@ -118,7 +113,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); -- cgit 1.2.3-korg