#!/bin/bash log=../merge.log [ -f merge.log ] && log=merge.log control=../real_control [ -f real_control ] && control=real_control branch="" [ "$1" = "-t" ] && { branch=$2 shift 2 } [ "$branch" ] || { branch=$(grep '^Merging ' $log | tail -1 | sed 's/^Merging //' | sed 's/ .*$//') branch=${branch%%/*} } contact=$(awk -F ' ' '$3=="'"$branch"'" { print $1; }' $control) greeting=${contact%% *} greeting=${greeting#\"} [ "${contact%,*}" = "${contact}" ] || greeting="all" file="$*" gitk --merge -- $file & [ "$file" ] && gvim $file sylpheed --compose "mailto:$contact?Cc=linux-next@vger.kernel.org,%20linux-kernel@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.%0A\ %0A\ I fixed it up (see below) and can carry the fix as necessary (no action%0A\ is required)." exit 0