mirror of
https://github.com/git/git.git
synced 2025-12-12 20:36:24 +01:00
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 <fs@gigacodes.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
e8191a5265
commit
9d12546de9
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user