14 # go likes to use these
16 die unknown command init $*
34 # go likes to use these
36 die unknown command clone $*
44 git/branch -n -b $1 origin/$1
49 die unknown options for pull $*
62 # go likes to use these
64 die unknown command clone $*
76 die unknown command pull $*
78 die git checkout branch
83 if(test -f .gitmodules)
84 die 'submodules unsupported'
94 echo `{dcmd git9/branch | sed s@^heads/@@g}
105 die unknown command pull $*
110 filter='-e(^|/)'^$*^'$'
111 for(b in `$nl{cd $gitroot/.git/refs/ && walk -f})
112 echo `{cat $gitroot/.git/refs/$b} refs/$b
116 if({! ~ $#* 3 && ! ~ $#* 4} || ! ~ $1 add)
117 die unimplemented remote cmd $*
122 >>$gitroot/.git/config{
123 echo '[remote "'$name'"]'
129 echo git version 2.2.0
134 echo 'git <command> <args>' >[1=2]
139 >[1=2] echo git $_cmdname: $*
145 ramfs -m /n/gitcompat
146 touch /n/gitcompat/git
147 bind $0 /n/gitcompat/git
148 path=( /n/gitcompat $path )
152 if(! test -f '/env/fn#cmd_'$1)
153 die git $1: commmand not implemented
154 if(! ~ $1 init && ! ~ $1 clone)
155 gitroot=`{git/conf -r} || die repo