Skip to content

Commit

Permalink
Allow config file to specify Signed-off-by identity in format-patch.
Browse files Browse the repository at this point in the history
Unlike git-commit, git-format-patch was not picking up and using the
user.email config variable for the email part of the committer info.
I was forced to use the GIT_COMMITTER_EMAIL environment variable to
override the default <user@localhost.localdomain>. The fix was to
simply move the call to setup_ident() to come before the git_config()
call.

Signed-off-by: Ramsay Allan Jones <ramsay@ramsay1.demon.co.uk>
Acked-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Ramsay Jones authored and Junio C Hamano committed Aug 5, 2006
1 parent 4e273c9 commit 07efc6a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion builtin-log.c
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
char message_id[1024];
char ref_message_id[1024];

setup_ident();
git_config(git_format_config);
init_revisions(&rev, prefix);
rev.commit_format = CMIT_FMT_EMAIL;
Expand Down Expand Up @@ -306,7 +307,6 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
!strcmp(argv[i], "-s")) {
const char *committer;
const char *endpos;
setup_ident();
committer = git_committer_info(1);
endpos = strchr(committer, '>');
if (!endpos)
Expand Down

0 comments on commit 07efc6a

Please sign in to comment.