Plan 9 from Bell Labs’s /usr/web/sources/contrib/yk/root/rc/bin/git/add

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


#!/bin/rc -e
rfork ne
. /rc/bin/git/defs

gitup

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

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

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

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.