Skip to contentSkip to conversation

Fix git-format-patch -s

PATCH New Eric W. Biederman 1 participant 1 message Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix git-format-patch -s

When git-format-patch was converted to a builtin an appropriate call to setup_ident was missed and thus git-format-patch -s fails because it doesn't look up anything in the password file.

---
 builtin-log.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
builtin-log.c +5 -2
index 29a8851..322024c 100644
@@ -217,8 +217,11 @@ int cmd_format_patch(int argc, const cha
 		}
 		else if (!strcmp(argv[i], "--signoff") ||
 			 !strcmp(argv[i], "-s")) {
-			const char *committer = git_committer_info(1);
-			const char *endpos = strchr(committer, '>');
+			const char *committer;
+			const char *endpos;
+			setup_ident();
+			committer = git_committer_info(1);
+			endpos = strchr(committer, '>');
 			if (!endpos)
 				die("bogos committer info %s\n", committer);
 			add_signoff = xmalloc(endpos - committer + 2);
Signature · 1 line
1.4.0.g25f48-dirty