]> git.ipfire.org Git - thirdparty/git.git/commit
git-gui: strip the commit message after running commit-msg hook
authorOrgad Shaneh <orgads@gmail.com>
Sun, 13 Jul 2025 20:59:38 +0000 (23:59 +0300)
committerOrgad Shaneh <orgads@gmail.com>
Mon, 14 Jul 2025 13:11:22 +0000 (16:11 +0300)
commitbfacf832b040885f876053244a75491b0dd792b6
tree3dc90c0a9efca0fc1ce7b848b756db59490da770
parent3f072308447ed2aab0228d21a7ce334beeeca7e8
git-gui: strip the commit message after running commit-msg hook

When commit-msg writes the file using CRLF, the lines in the final
message include trailing spaces.

Postpone stripping until after hooks execute.

This aligns with Git's behavior, which passes the original message
to commit-msg, then strips comments and whitespace.

Signed-off-by: Orgad Shaneh <orgads@gmail.com>
lib/commit.tcl