#!/bin/bash branch="" [ "$1" = "-t" ] && { branch="-t $2" shift 2 } file="$*" gitk --merge -- $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 tree" $(dirname $0)/message_helper $branch "$subject" <