All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] commit: do not cleanup template
@ 2011-05-07 15:53 Boris Faure
  2011-05-07 15:53 ` [PATCH 2/2] commit: do not add a newline after a template Boris Faure
  2011-05-07 20:13 ` [PATCH 1/2] commit: do not cleanup template Junio C Hamano
  0 siblings, 2 replies; 11+ messages in thread
From: Boris Faure @ 2011-05-07 15:53 UTC (permalink / raw)
  To: git; +Cc: Boris Faure

The template can begin with a new line (to insert commit title) that
should not be cleaned up.

Signed-off-by: Boris Faure <billiob@gmail.com>
---
 builtin/commit.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/builtin/commit.c b/builtin/commit.c
index 67757e9..f0e880b 100644
--- a/builtin/commit.c
+++ b/builtin/commit.c
@@ -708,7 +708,7 @@ static int prepare_to_commit(const char *index_file, const char *prefix,
 	if (s->fp == NULL)
 		die_errno(_("could not open '%s'"), git_path(commit_editmsg));
 
-	if (cleanup_mode != CLEANUP_NONE)
+	if (!template_file && cleanup_mode != CLEANUP_NONE)
 		stripspace(&sb, 0);
 
 	if (signoff) {
-- 
1.7.5.1

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2011-05-08 18:47 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-07 15:53 [PATCH 1/2] commit: do not cleanup template Boris Faure
2011-05-07 15:53 ` [PATCH 2/2] commit: do not add a newline after a template Boris Faure
2011-05-07 20:13 ` [PATCH 1/2] commit: do not cleanup template Junio C Hamano
2011-05-07 21:17   ` Boris 'billiob' Faure
2011-05-07 22:31     ` Junio C Hamano
2011-05-08  8:38   ` Sebastian Schuberth
2011-05-08  8:47   ` Sebastian Schuberth
2011-05-08 10:31     ` [PATCH/RFC v2] Do not strip empty lines / trailing spaces from a commit message template Boris Faure
2011-05-08 12:28       ` Sebastian Schuberth
2011-05-08 18:14         ` Junio C Hamano
2011-05-08 18:55           ` [PATCH/RFC v3] " Boris Faure

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.