X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=merge_msg;h=33332d30255c68767d4a536701b1dd96b2250912;hb=01572e70fb286ac49e902afbabe79f8a4f800f58;hp=e6e87521d24615a78eb0577fef88445ff37994e9;hpb=aaa8ed93285d4110a0f367b89d6195c6eaebecfe;p=next-scripts diff --git a/merge_msg b/merge_msg index e6e8752..33332d3 100755 --- a/merge_msg +++ b/merge_msg @@ -1,33 +1,28 @@ #!/bin/bash -branch="" -[ "$1" = "-t" ] && { - branch="-t $2" +branch='' +if [ "X$1" = 'X-t' ]; then + branch=( -t "$2" ) shift 2 -} +fi -file="$*" +gitk --merge -- "$@" & -gitk --merge -- $file & -[ "$file" ] && gvim $file 2>/dev/null +printf -v files ' %s\n' "$@" +conf='a conflict' +if [ "$#" -gt 1 ]; then + conf='conflicts' +fi -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' -subject="manual merge of the BRANCH tree with the FIXME tree" - -$(dirname $0)/message_helper $branch "$subject" <