hc+=( "$(git log -1 --format='%h ("%s")' "$c")" )
readarray -t -O "${#cc[@]}" cc < <(git log -1 --format="$cformat" "$c" | sort -u)
done
+hcs=''
+if [ "${#hc[@]}" -gt 1 ]; then
+ hcs='s'
+fi
+
+read -r -a head_branches -p 'HEAD branch(es): '
+
+hb=( "${head_branches[@]/%/,}" )
+hb[-1]=${hb[-1]%,}
+if [ "${#hb[@]}" -gt 2 ]; then
+ hb[-2]=${hb[-2]/%,/ and}
+fi
+hbs=''
+if [ "${#hb[@]}" -gt 1 ]; then
+ hbs='s'
+fi
+
+printf -v subject 'manual merge of the BRANCH tree with the %s tree%s' \
+ "${hb[*]}" "$hbs"
printf -v files ' %s\n' "$@"
conf='a conflict'
conf='conflicts'
fi
-subject='manual merge of the BRANCH tree with the FIXME tree'
-
"$tools_dir/message_helper" "${branch[@]}" "$subject" "${cc[@]}" <<EOF
FIXME: Add owner of second tree to To:
Add author(s)/SOB of conflicting commits.
Today's linux-next merge of the BRANCH tree got $conf in:
$files
-between commit:
+between commit$hcs:
$(printf ' %s\n' "${hc[@]}")
-from the FIXME tree and commit:
+from the ${hb[*]} tree$hbs and commit:
("")