[PATCH 1/2] commit: do not cleanup template
- From
Boris Faure <billiob@gmail.com>
- Date
- May 7, 2011, 15:53 UTC
- Message-ID
- <1304783624-9919-1-git-send-email-billiob@gmail.com>
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