We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 2f0f286 + 80983c4 commit e8dd723Copy full SHA for e8dd723
lib/commit.tcl
@@ -214,12 +214,10 @@ You must stage at least 1 file before you can commit.
214
global comment_string
215
set cmt_rx [strcat {(^|\n)} [regsub -all {\W} $comment_string {\\&}] {[^\n]*}]
216
regsub -all $cmt_rx $msg {\1} msg
217
- # Strip leading empty lines
218
- regsub {^\n*} $msg {} msg
+ # Strip leading and trailing empty lines (puts adds one \n)
+ set msg [string trim $msg \n]
219
# Compress consecutive empty lines
220
regsub -all {\n{3,}} $msg "\n\n" msg
221
- # Strip trailing empty line
222
- regsub {\n\n$} $msg "\n" msg
223
if {$msg eq {}} {
224
error_popup [mc "Please supply a commit message.
225
0 commit comments