Skip to content

Commit 14f1467

Browse files
committed
Merge branch 'pt/am-builtin' into maint
When "git am" was rewritten as a built-in, it stopped paying attention to user.signingkey, which was fixed. * pt/am-builtin: am: configure gpg at startup
2 parents df64186 + 434c64d commit 14f1467

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

builtin/am.c

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2208,6 +2208,17 @@ enum resume_mode {
22082208
RESUME_ABORT
22092209
};
22102210

2211+
static int git_am_config(const char *k, const char *v, void *cb)
2212+
{
2213+
int status;
2214+
2215+
status = git_gpg_config(k, v, NULL);
2216+
if (status)
2217+
return status;
2218+
2219+
return git_default_config(k, v, NULL);
2220+
}
2221+
22112222
int cmd_am(int argc, const char **argv, const char *prefix)
22122223
{
22132224
struct am_state state;
@@ -2308,7 +2319,7 @@ int cmd_am(int argc, const char **argv, const char *prefix)
23082319
OPT_END()
23092320
};
23102321

2311-
git_config(git_default_config, NULL);
2322+
git_config(git_am_config, NULL);
23122323

23132324
am_state_init(&state, git_path("rebase-apply"));
23142325

0 commit comments

Comments
 (0)