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() { ...@@ -26,7 +26,8 @@ die() {
echo '-----------------------' 1>&2 echo '-----------------------' 1>&2
echo '' 1>&2 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"' git commit -e -F '"$commit_msg"'
(assuming your working directory is at the top).' 1>&2 (assuming your working directory is at the top).' 1>&2
exit 1 exit 1
...@@ -44,18 +45,15 @@ msg_first() { ...@@ -44,18 +45,15 @@ msg_first() {
die 'The first line must be at least 8 characters: die 'The first line must be at least 8 characters:
-------- --------
'"$line"' '"$line"'
-------- --------'
'
elif test $len -gt 78; then elif test $len -gt 78; then
die 'The first line may be at most 78 characters: die 'The first line may be at most 78 characters:
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
'"$line"' '"$line"'
------------------------------------------------------------------------------ ------------------------------------------------------------------------------'
'
elif echo "$line" | grep "^[ ]\|[ ]$" >/dev/null 2>&1; then elif echo "$line" | grep "^[ ]\|[ ]$" >/dev/null 2>&1; then
die 'The first line may not have leading or trailing space: die 'The first line may not have leading or trailing space:
['"$line"'] ['"$line"']'
'
else else
# first line okay # first line okay
state=second 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