10 >[1=2] echo -n 'usage:' $usage
14 # subst [-g] this [that]
18 for(i = 1; ARGV[i] ~ /^-/; i++){
23 this = ARGV[i++]; ARGC--
24 that = ARGV[i++]; ARGC--
27 if(global) gsub(this, that)
34 if(~ $1 /dev/null && cmp $2 $3>/dev/null)
36 if not if (~ $3 /dev/null && cmp $1 $2>/dev/null)
42 # merge1 out theirs base ours
53 n=`{echo $n + 1 | hoc}
62 if(! ape/diff3 -3 -m $ours $base $theirs > $tmp)
63 echo merge needed: $out >[1=2]
65 if(present $ours $base $theirs){
76 gitroot=`{git/conf -r >[2]/dev/null}
78 die 'not a git repository'
79 gitfs=$gitroot/.git/fs
80 gitrel=`{pwd | subst '^'$"gitroot'/?'}
87 if(! test -e $gitfs/ctl)
89 if(! grep -s '^repo '$gitroot'$' $gitfs/ctl >[2]/dev/null)