diff options
author | Oleg Pudeyev <oleg@bsdpower.com> | 2011-03-11 19:27:38 -0500 |
---|---|---|
committer | Oleg Pudeyev <oleg@bsdpower.com> | 2011-03-11 19:30:40 -0500 |
commit | 94e09ac041ac7bc9fd52c8bd1d13d1a91da1da6f (patch) | |
tree | d52547571e70fe9bf7174ba1b01d23e48f951fa0 /git-tools | |
parent | Merge branch 'ticket/rxu/10035' into develop-olympus (diff) | |
download | phpbb-94e09ac041ac7bc9fd52c8bd1d13d1a91da1da6f.tar.gz phpbb-94e09ac041ac7bc9fd52c8bd1d13d1a91da1da6f.tar.bz2 phpbb-94e09ac041ac7bc9fd52c8bd1d13d1a91da1da6f.zip |
[ticket/10078] Avoid \n in strings given to echo for portability.
Also preserve whitespace (including newlines) when printing the
lines that exceed 80 character limit.
PHPBB3-10078
Diffstat (limited to 'git-tools')
-rwxr-xr-x | git-tools/hooks/commit-msg | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/git-tools/hooks/commit-msg b/git-tools/hooks/commit-msg index ad4d69a9da..9114cd368a 100755 --- a/git-tools/hooks/commit-msg +++ b/git-tools/hooks/commit-msg @@ -70,8 +70,9 @@ msg=$(grep -nE '.{81,}' "$1"); if [ $? -eq 0 ] then - echo "The following lines are greater than 80 characters long:\n" >&2; - echo $msg >&2; + echo "The following lines are greater than 80 characters long:" >&2; + echo >&2 + echo "$msg" >&2; quit $ERR_LENGTH; fi |