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:
authorJeff King <peff@peff.net>2023-02-27 01:40:46 +0300
committerJunio C Hamano <gitster@pobox.com>2023-02-27 19:00:39 +0300
commitcc5d1d32fd489f7eb98f762de303b499f2117638 (patch)
tree71feb3b50d2969aeff55c0b460350fad29b9b43e /builtin/am.c
parentfd2d4c135ed974fdddf2af687748d28c58575984 (diff)
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 <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/am.c')
-rw-r--r--builtin/am.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/builtin/am.c b/builtin/am.c
index 40126b59c5..fccf40f8ee 100644
--- a/builtin/am.c
+++ b/builtin/am.c
@@ -2312,11 +2312,6 @@ static int parse_opt_show_current_patch(const struct option *opt, const char *ar
return 0;
}
-static int git_am_config(const char *k, const char *v, void *cb UNUSED)
-{
- return git_default_config(k, v, NULL);
-}
-
int cmd_am(int argc, const char **argv, const char *prefix)
{
struct am_state state;
@@ -2440,7 +2435,7 @@ int cmd_am(int argc, const char **argv, const char *prefix)
if (argc == 2 && !strcmp(argv[1], "-h"))
usage_with_options(usage, options);
- git_config(git_am_config, NULL);
+ git_config(git_default_config, NULL);
am_state_init(&state);