From 9d12546de9d75be70440e340a5f4bb6f9e41a89f Mon Sep 17 00:00:00 2001 From: Fabian Stelzer Date: Tue, 12 Oct 2021 11:22:35 +0200 Subject: ssh signing: fmt-merge-msg tests & config parse When merging a signed tag fmt-merge-msg was unable to verify its validity missing the necessary ssh allowedSignersFile config. Adds gpg config parsing to fmt-merge-msg. Adds tests for ssh signed tags to fmt-merge-msg tests. Signed-off-by: Fabian Stelzer Signed-off-by: Junio C Hamano --- fmt-merge-msg.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'fmt-merge-msg.c') diff --git a/fmt-merge-msg.c b/fmt-merge-msg.c index 2901c5e4f8..5216191488 100644 --- a/fmt-merge-msg.c +++ b/fmt-merge-msg.c @@ -9,6 +9,7 @@ #include "branch.h" #include "fmt-merge-msg.h" #include "commit-reach.h" +#include "gpg-interface.h" static int use_branch_desc; static int suppress_dest_pattern_seen; @@ -16,6 +17,8 @@ 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); @@ -34,6 +37,9 @@ 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; -- cgit v1.2.3