From: Junio C Hamano Date: Tue, 2 Apr 2013 22:10:49 +0000 (-0700) Subject: Merge branch 'js/log-gpg' X-Git-Tag: v1.8.3-rc0~132 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/68ef16b8488da1a9eed241340af194979d328ba7?ds=inline;hp=-c Merge branch 'js/log-gpg' Teach "show/log" honor gpg.program configuration just like other parts of the code that use GnuPG. * js/log-gpg: log: read gpg settings for signed commit verification --- 68ef16b8488da1a9eed241340af194979d328ba7 diff --combined builtin/log.c index 59de484bc2,6987a9f2d9..0f318107e5 --- a/builtin/log.c +++ b/builtin/log.c @@@ -23,6 -23,7 +23,7 @@@ #include "streaming.h" #include "version.h" #include "mailmap.h" + #include "gpg-interface.h" /* Set a default date-time format for git log ("log.date" config variable) */ static const char *default_date_mode = NULL; @@@ -367,6 -368,8 +368,8 @@@ static int git_log_config(const char *v if (grep_config(var, value, cb) < 0) return -1; + if (git_gpg_config(var, value, cb) < 0) + return -1; return git_diff_ui_config(var, value, cb); } @@@ -1086,6 -1089,7 +1089,6 @@@ int cmd_format_patch(int argc, const ch struct commit *origin = NULL, *head = NULL; const char *in_reply_to = NULL; struct patch_ids ids; - char *add_signoff = NULL; struct strbuf buf = STRBUF_INIT; int use_patch_format = 0; int quiet = 0; @@@ -1192,6 -1196,16 +1195,6 @@@ rev.subject_prefix = strbuf_detach(&sprefix, NULL); } - if (do_signoff) { - const char *committer; - const char *endpos; - committer = git_committer_info(IDENT_STRICT); - endpos = strchr(committer, '>'); - if (!endpos) - die(_("bogus committer info %s"), committer); - add_signoff = xmemdupz(committer, endpos - committer + 1); - } - for (i = 0; i < extra_hdr.nr; i++) { strbuf_addstr(&buf, extra_hdr.items[i].string); strbuf_addch(&buf, '\n'); @@@ -1382,7 -1396,7 +1385,7 @@@ total++; start_number--; } - rev.add_signoff = add_signoff; + rev.add_signoff = do_signoff; while (0 <= --nr) { int shown; commit = list[nr];