shithub: regress

ref: 75f5c7d3948bc647b21272c2e0bcbf841fb4d9f7
dir: /cmd/git/add.rc/

View raw version
#!/bin/rc

. ../util.rc

rm -fr scratch
mkdir -p scratch/repo

echo @@ abs paths @@
@{
	rfork ne
	cd scratch/repo
	pwd=`{pwd}
	git/init
	mkdir dir
	mkdir another
	mkdir more
	mkdir extra
	touch a b c
	touch dir/^(a b c)
	touch another/^(a b c)
	touch more/^(a b c)
	touch extra/^(a b c)
	git/add a
	git/add $pwd/b
	git/add dir/a
	git/add $pwd/dir/b
	git/add more
	@{cd more && git/add ../extra/a}
	@{cd more && git/add $pwd/extra/b}
	git/fs
	git/walk > ../added
}

diff -c scratch/added add.expected >/dev/null || die wrong files