@matheusbsbs / matheus-bagliano / commits / 07efc6a6b6
Fork 0

Allow config file to specify Signed-off-by identity in format-patch.

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>

Ramsay Jones committed Aug 4, 2006 at 22:01 UTC 07efc6a6b6e5098ccd2dcce853be421b7dd1e244
1 file changed +1 -1
builtin-log.c
+1 -1
@@ -257,6 +257,7 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
257 char message_id[1024];
258 char ref_message_id[1024];
259
260 + setup_ident();
261 git_config(git_format_config);
262 init_revisions(&rev, prefix);
263 rev.commit_format = CMIT_FMT_EMAIL;
@@ -306,7 +307,6 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
307 !strcmp(argv[i], "-s")) {
308 const char *committer;
309 const char *endpos;
309 - setup_ident();
310 committer = git_committer_info(1);
311 endpos = strchr(committer, '>');
312 if (!endpos)