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'"]'
131 remote=`$nl{git/conf 'remote "'$1'".url'}
134 git/fetch -l $remote | awk '/^remote/{print $3"\t"$2}'
138 echo git version 2.2.0
143 echo 'git <command> <args>' >[1=2]
148 >[1=2] echo git $_cmdname: $*
154 ramfs -m /n/gitcompat
155 touch /n/gitcompat/git
156 bind $0 /n/gitcompat/git
157 path=( /n/gitcompat $path )
161 if(! test -f '/env/fn#cmd_'$1)
162 die git $1: commmand not implemented
163 if(! ~ $1 init && ! ~ $1 clone)
164 gitroot=`{git/conf -r} || die repo