shithub: riscv

ref: f0ac2d01765f938a4f3656efef440cf2c1bca69d
dir: /sys/src/cmd/git/add/

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

gitup

flagfmt='r:remove'; args='file ...'
eval `''{aux/getflags $*} || exec aux/usage

s=A
if(~ $remove 1)
	s=R
if(~ $#* 0)
	exec aux/usage

paths=`$nl{cleanname -d $gitrel $* | drop $gitroot}
walk -f ./$paths | grep -v '^(./)?.git/' | \
	sed 's/^/'$s' NOQID 0 /' >> .git/INDEX9
exit ''