t2110: test tg create --topmsg, --no-edit and friends
[topgit/pro.git] / tg--index-merge-one-file-toptheirs.sh
blobbe81fd7bc27df37c569a01a71ed4134510b9775a
1 #!/bin/sh
3 # tg--index-merge-one-file-toptheirs -- auto merge a file without touching working tree
4 # Copyright (C) 2017 Kyle J. McKay
5 # All rights reserved.
6 # License GPLv2+
8 # TG_INST_CMDDIR => location of tg--index-merge-one-file script
10 [ -n "$TG_INST_CMDDIR" ] || case "$0" in */?*[!/]) TG_INST_CMDDIR="${0%/*}"; esac
12 [ -n "$TG_INST_CMDDIR" ] && [ -d "$TG_INST_CMDDIR" ] &&
13 [ -f "$TG_INST_CMDDIR/tg--index-merge-one-file" ] &&
14 [ -r "$TG_INST_CMDDIR/tg--index-merge-one-file" ] || {
15 echo "fatal: missing tg--index-merge-one-file script" >&2
16 exit 2
19 tg_index_mergetop_behavior="theirs"
20 . "$TG_INST_CMDDIR/tg--index-merge-one-file"