#!/bin/bash branch="" [ "$1" = "-t" ] && { branch="-t $2" shift 2 } gitk --merge -- "$@" & [ "$#" ] && gvim "$@" 2>/dev/null printf -v files " %s\n" "$@" conf="a conflict" [ "$#" -gt 1 ] && conf="conflicts" subject="manual merge of the BRANCH tree with the FIXME tree" $(dirname $0)/message_helper $branch "$subject" <