shithub: git9

ref: ab14718d835ffae7265db405b89ea29b216de8a8
dir: /revert/

View raw version
#!/bin/rc
rfork e
. /sys/lib/git/common.rc

gitup

flagfmt='c:query query' args='file ...'
eval `''{aux/getflags $*} || exec aux/usage

commit=/mnt/git/HEAD
if(~ $#query 1)
	commit=`{git/query -p $commit}

for(f in `$nl{cd $commit/tree/ && walk -f ./$gitrel/$*}){
	mkdir -p `{basename -d $f}
	cp -- $commit/tree/$f $f
	git/add $f
}
exit ''