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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxxxxx>. 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@xxxxxxxxxxxxxxxxxxx>
---
 builtin-log.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/builtin-log.c b/builtin-log.c
index f9515a8..dcee141 100644
--- a/builtin-log.c
+++ b/builtin-log.c
@@ -243,6 +243,7 @@ int cmd_format_patch(int argc, const cha
 	rev.ignore_merges = 1;
 	rev.diffopt.output_format = DIFF_FORMAT_PATCH;
 
+	setup_ident();
 	git_config(git_format_config);
 	rev.extra_headers = extra_headers;
 
@@ -283,7 +284,6 @@ int cmd_format_patch(int argc, const cha
 			 !strcmp(argv[i], "-s")) {
 			const char *committer;
 			const char *endpos;
-			setup_ident();
 			committer = git_committer_info(1);
 			endpos = strchr(committer, '>');
 			if (!endpos)
-- 
1.4.1
From 2bc01f2ceb042192827d05e941ca81c1a7dc30fe Mon Sep 17 00:00:00 2001
From: Ramsay Allan Jones <ramsay@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 4 Aug 2006 17:18:15 +0100
Subject: [PATCH] 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@xxxxxxxxxxxxxxxxxxxxx>. 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@xxxxxxxxxxxxxxxxxxx>
---
 builtin-log.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/builtin-log.c b/builtin-log.c
index f9515a8..dcee141 100644
--- a/builtin-log.c
+++ b/builtin-log.c
@@ -243,6 +243,7 @@ int cmd_format_patch(int argc, const cha
 	rev.ignore_merges = 1;
 	rev.diffopt.output_format = DIFF_FORMAT_PATCH;
 
+	setup_ident();
 	git_config(git_format_config);
 	rev.extra_headers = extra_headers;
 
@@ -283,7 +284,6 @@ int cmd_format_patch(int argc, const cha
 			 !strcmp(argv[i], "-s")) {
 			const char *committer;
 			const char *endpos;
-			setup_ident();
 			committer = git_committer_info(1);
 			endpos = strchr(committer, '>');
 			if (!endpos)
-- 
1.4.1


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]