summaryrefslogtreecommitdiff
path: root/builtin/am.c
diff options
context:
space:
mode:
authorRenee Margaret McConahy <nepella@gmail.com>2015-09-30 17:49:44 (GMT)
committerJunio C Hamano <gitster@pobox.com>2015-09-30 20:02:30 (GMT)
commit434c64df669284af7e19fafd0ab496bc075cd24b (patch)
treee3fd88273e5de3dc113c32a3ec49e6b8ea66a7cb /builtin/am.c
parent1fb5a0ea96435e0bf4459fe5987df4c6b8a2fc76 (diff)
downloadgit-434c64df669284af7e19fafd0ab496bc075cd24b.zip
git-434c64df669284af7e19fafd0ab496bc075cd24b.tar.gz
git-434c64df669284af7e19fafd0ab496bc075cd24b.tar.bz2
am: configure gpg at startup
The new builtin am ignores the user.signingkey variable: gpg is being called with the committer details as the key ID, which may not be correct. git_gpg_config is responsible for handling that variable and is expected to be called on initialization by any modules that use gpg. Signed-off-by: Renee Margaret McConahy <nepella@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/am.c')
-rw-r--r--builtin/am.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/builtin/am.c b/builtin/am.c
index 473d794..ec75906 100644
--- a/builtin/am.c
+++ b/builtin/am.c
@@ -2125,6 +2125,17 @@ enum resume_mode {
RESUME_ABORT
};
+static int git_am_config(const char *k, const char *v, void *cb)
+{
+ int status;
+
+ status = git_gpg_config(k, v, NULL);
+ if (status)
+ return status;
+
+ return git_default_config(k, v, NULL);
+}
+
int cmd_am(int argc, const char **argv, const char *prefix)
{
struct am_state state;
@@ -2223,7 +2234,7 @@ int cmd_am(int argc, const char **argv, const char *prefix)
OPT_END()
};
- git_config(git_default_config, NULL);
+ git_config(git_am_config, NULL);
am_state_init(&state, git_path("rebase-apply"));