[PATCH 2/2] commit: do not add a newline after a template
Signed-off-by: Boris Faure <billiob@gmail.com>
---
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