#!/bin/bash
-log=../merge.log
-[ -f merge.log ] && log=merge.log
-control=../real_control
-[ -f real_control ] && control=real_control
-
-branch=$(grep '^Merging ' $log | tail -1 | sed 's/^Merging //')
-branch=${branch#quilt/}
-branch=${branch%%/*}
-
-contact=$(sed -n "/ $branch /s/ .*$//p" $control)
-greeting=${contact%% *}
-[ "${contact%,*}" = "${contact}" ] || greeting="all"
+branch=""
+[ "$1" = "-t" ] && {
+ branch="-t $2"
+ shift 2
+}
file="$*"
gitk --merge -- $file &
-[ "$file" ] && gvim $file
+[ "$file" ] && gvim $file 2>/dev/null
+
+conf="a conflict"
+[ "$#" -gt 1 ] && {
+ file=${file// /, }
+ file=$(echo $file | sed 's/,\([^,]*\)$/ and\1/')
+ conf="conflicts"
+}
+
+subject="manual merge of the BRANCH tree with the FIXME tree"
+
+$(dirname $0)/message_helper $branch "$subject" <<EOF
+Today's linux-next merge of the BRANCH tree got $conf in:
+
+ $file
+
+between commit:
+
+ ("")
+
+from the FIXME tree and commit:
+
+ ("")
+
+from the BRANCH tree.
-sylpheed --compose "mailto:$contact?Cc=linux-next@vger.kernel.org&Subject=linux-next: manual merge of the $branch tree with the tree&Body=Hi $greeting,%0A\
-%0A\
-Today's linux-next merge of the $branch tree got a conflict in $file between commit (%22%22) from the tree and commit (%22%22) from the $branch tree."
+I fixed it up (see below) and can carry the fix as necessary (no action
+is required).
+EOF
exit 0