summaryrefslogtreecommitdiff
path: root/builtin/verify-commit.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2023-02-26 22:40:46 (GMT)
committerJunio C Hamano <gitster@pobox.com>2023-02-27 16:00:39 (GMT)
commitcc5d1d32fd489f7eb98f762de303b499f2117638 (patch)
tree71feb3b50d2969aeff55c0b460350fad29b9b43e /builtin/verify-commit.c
parentfd2d4c135ed974fdddf2af687748d28c58575984 (diff)
downloadgit-cc5d1d32fd489f7eb98f762de303b499f2117638.zip
git-cc5d1d32fd489f7eb98f762de303b499f2117638.tar.gz
git-cc5d1d32fd489f7eb98f762de303b499f2117638.tar.bz2
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/verify-commit.c')
-rw-r--r--builtin/verify-commit.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/builtin/verify-commit.c b/builtin/verify-commit.c
index 3c5d0b0..7aedf10 100644
--- a/builtin/verify-commit.c
+++ b/builtin/verify-commit.c
@@ -52,11 +52,6 @@ static int verify_commit(const char *name, unsigned flags)
return run_gpg_verify((struct commit *)obj, flags);
}
-static int git_verify_commit_config(const char *var, const char *value, void *cb)
-{
- return git_default_config(var, value, cb);
-}
-
int cmd_verify_commit(int argc, const char **argv, const char *prefix)
{
int i = 1, verbose = 0, had_error = 0;
@@ -67,7 +62,7 @@ int cmd_verify_commit(int argc, const char **argv, const char *prefix)
OPT_END()
};
- git_config(git_verify_commit_config, NULL);
+ git_config(git_default_config, NULL);
argc = parse_options(argc, argv, prefix, verify_commit_options,
verify_commit_usage, PARSE_OPT_KEEP_ARGV0);