shift 2
}
-file="$*"
+commit1=$1
+shift
+
+commit2=$1
+shift
-gitk --merge -- $file &
-[ "$file" ] && gvim $file 2>/dev/null
+if [[ -z $commit1 || -z $commit2 ]]; then
+ echo "Usage: $0 [-t branch] commit1 commit2 [files...]" >&2
+ exit 1
+fi
+
+file="$*"
conf="a conflict"
[ "$#" -gt 1 ] && {
subject="manual merge of the BRANCH tree with the FIXME tree"
+c1_title=$(git log -1 --pretty="%h \"%s\"" $commit1)
+c2_title=$(git log -1 --pretty="%h \"%s\"" $commit2)
+c1_addrs=$(git log -1 --pretty="%an <%ae>, %cn <%ce>" $commit1)
+c2_addrs=$(git log -1 --pretty="%an <%ae>, %cn <%ce>" $commit2)
+c1_sobs=$(git log -1 --pretty="%b" $commit1 | awk '$1 ~ /-by:/ {$1=""; print $0","}')
+c2_sobs=$(git log -1 --pretty="%b" $commit2 | awk '$1 ~ /-by:/ {$1=""; print $0","}')
+
+diff=$(git diff $file)
+
$(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.
+Today's linux-next merge of the BRANCH tree got $conf in:
+
+ $file
+
+between commit:
+
+ $c1_title
+
+ Author/committer:
+ $c1_addrs
+ SOBS:
+ $c1_sobs
+
+from the FIXME tree and commit:
+
+ $c2_title
+
+ Author/committer:
+ $c2_addrs
+ SOBS:
+ $c2_sobs
+
+from the BRANCH tree.
I fixed it up (see below) and can carry the fix as necessary (no action
is required).
+
+cheers
+
+
+$diff
EOF
exit 0