Commit 7cd97516 authored by Brad King's avatar Brad King
Browse files

commit-msg: Simplify newlines in die() calls

parent 592711ab
......@@ -26,7 +26,8 @@ die() {
echo '-----------------------' 1>&2
echo '' 1>&2
echo "$@" 1>&2
echo 'To continue editing, run the command
echo '
To continue editing, run the command
git commit -e -F '"$commit_msg"'
(assuming your working directory is at the top).' 1>&2
exit 1
......@@ -44,18 +45,15 @@ msg_first() {
die 'The first line must be at least 8 characters:
--------
'"$line"'
--------
'
--------'
elif test $len -gt 78; then
die 'The first line may be at most 78 characters:
------------------------------------------------------------------------------
'"$line"'
------------------------------------------------------------------------------
'
------------------------------------------------------------------------------'
elif echo "$line" | grep "^[ ]\|[ ]$" >/dev/null 2>&1; then
die 'The first line may not have leading or trailing space:
['"$line"']
'
['"$line"']'
else
# first line okay
state=second
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment