tg.sh: include bad ref in ref_exists_rev failure message
[topgit/pro.git] / tg--index-merge-one-file-topmerge.sh
blobf7352d30a29ec0a869c2d9f979062d8da94f3424
1 #!/bin/sh
3 # tg--index-merge-one-file-topmerge -- 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="merge"
20 . "$TG_INST_CMDDIR/tg--index-merge-one-file"