diff options
author | Peter Wu <peter@lekensteyn.nl> | 2018-07-23 13:30:35 +0200 |
---|---|---|
committer | Peter Wu <peter@lekensteyn.nl> | 2018-07-26 21:12:49 +0000 |
commit | 19b61b07ba0cd9f43e231e72b598f9cd6b477522 (patch) | |
tree | b33322681b90ccd8991093d43d0e7ea56f73b13e /tools/commit-msg | |
parent | 5ad53f8f100471c1274cd7b942b485e6af435d66 (diff) |
commit-msg: quote the filename, fix printed message
Quote the filename in case it contains spaces or other special chars.
Change-Id: I5ff901de0839551c06bc73b8bef631b64aff5199
Fixes: v2.9.0rc0-1078-gc20432285a ("git hooks: prevent first commit message line to exceed 80 chars.")
Reviewed-on: https://code.wireshark.org/review/28827
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Diffstat (limited to 'tools/commit-msg')
-rwxr-xr-x | tools/commit-msg | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/commit-msg b/tools/commit-msg index cefedd0e8a..6ac323c8a4 100755 --- a/tools/commit-msg +++ b/tools/commit-msg @@ -184,10 +184,10 @@ _gen_ChangeId() { } reject_long_message() { - read -r firstline < $MSG + read -r firstline < "$MSG" if [ ${#firstline} -gt 80 ] then - echo "\n\nERROR: First line in the commit message must not exceed 80 characters\n\n" + printf "\n\nERROR: First line in the commit message must not exceed 80 characters\n\n" exit 1 fi } |