Thread (2 messages) flat view 2 messages, 1 author, 2016-06-15
DORMANTno replies

[PATCH 2/2] commit: do not add a newline after a template

From: Boris Faure <hidden>
Date: 2016-06-15 22:51:11
Subsystem: the rest · Maintainer: Linus Torvalds

Signed-off-by: Boris Faure <redacted>
---
 builtin/commit.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/builtin/commit.c b/builtin/commit.c
index f0e880b..2209924 100644
--- a/builtin/commit.c
+++ b/builtin/commit.c
@@ -754,7 +754,8 @@ static int prepare_to_commit(const char *index_file, const char *prefix,
 					 ? "MERGE_HEAD"
 					 : "CHERRY_PICK_HEAD"));
 
-		fprintf(s->fp, "\n");
+		if (!template_file)
+			fprintf(s->fp, "\n");
 		status_printf(s, GIT_COLOR_NORMAL,
 			_("Please enter the commit message for your changes."));
 		if (cleanup_mode == CLEANUP_ALL)
-- 
1.7.5.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help