[PATCH] Force new line at end of commit message
- From
- Bernt Hansen <bernt@alumni.uwaterloo.ca>
- Date
- Dec 24, 2007, 14:31 UTC
- Message-ID
- <8763yof9lg.fsf@gollum.intra.norang.ca>
- In-Reply-To
- <87ve6ub3u7.fsf@gollum.intra.norang.ca>
git rebase --interactive formats the combined commit log message incorrectly when squashing 3 or more commits which have no newline on the last line of the commit message.
Signed-off-by: Bernt Hansen <bernt@alumni.uwaterloo.ca> ---
This may well be the wrong fix for this problem but my attempts to make git-rebase--interactive.sh append a newline breaks too many tests in the test suite.
I tried something like this in git-rebase--interactive.sh:
- git cat-file commit HEAD | sed -e '1,/^$/d' + git cat-file commit HEAD | sed -e '1,/^$/d' -e '$a\'
Sorry I don't have an automated test for git-gui. Are there any?
git-gui/lib/commit.tcl | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/git-gui/lib/commit.tcl b/git-gui/lib/commit.tcl index b2d2d53..1c0586c 100644 --- a/git-gui/lib/commit.tcl +++ b/git-gui/lib/commit.tcl @@ -303,7 +303,7 @@ A rescan will be automatically started now. puts stderr [mc "warning: Tcl does not support encoding '%s'." $enc] fconfigure $msg_wt -encoding utf-8 } - puts -nonewline $msg_wt $msg + puts $msg_wt $msg close $msg_wt # -- Create the commit.
-- 1.5.4.rc1.22.g88b9