Commit 3a0232f4 authored by Simon McVittie's avatar Simon McVittie

mergechanges: Don't print Description field if empty, as intended

"echo "" | wc -l" yields 1, for one empty line. We just want to know
whether DESCRIPTIONS is empty or non-empty, and test(1) has a way to
do that without extra processes.
Signed-off-by: Simon McVittie's avatarSimon McVittie <>
parent ee64cf4b
......@@ -238,7 +238,7 @@ OUTPUT=$(mktemp --tmpdir mergechanges.tmp.XXXXXXXXXX)
DESCFILE=$(mktemp --tmpdir mergechanges.tmp.XXXXXXXXXX)
trap 'rm -f "${OUTPUT}" "${DESCFILE}"' EXIT
if test $(echo "${DESCRIPTIONS}" | wc -l) -ne 0; then
if test -n "${DESCRIPTIONS}"; then
echo "Description: " > "${DESCFILE}"
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