tools_dir=$(dirname "$0")
+hc=()
+cc=()
+cformat='%(trailers:only=no,valueonly,unfold,key=signed-off-by)%aN <%aE>%n%cN <%cE>'
+
+read -r -a head_commits -p 'HEAD commit(s): '
+for c in "${head_commits[@]}"; do
+ if ! git rev-parse --verify "$c" >/dev/null; then
+ printf 'Unknown commit %s\n' "$c"
+ exit 1
+ fi
+ hc+=( "$(git log -1 --format='%h ("%s")' "$c")" )
+ readarray -t -O "${#cc[@]}" cc < <(git log -1 --format="$cformat" "$c" | sort -u)
+done
+
printf -v files ' %s\n' "$@"
conf='a conflict'
if [ "$#" -gt 1 ]; then
subject='manual merge of the BRANCH tree with the FIXME tree'
-"$tools_dir/message_helper" "${branch[@]}" "$subject" <<EOF
+"$tools_dir/message_helper" "${branch[@]}" "$subject" "${cc[@]}" <<EOF
FIXME: Add owner of second tree to To:
Add author(s)/SOB of conflicting commits.
$files
between commit:
- ("")
+$(printf ' %s\n' "${hc[@]}")
from the FIXME tree and commit: