summaryrefslogtreecommitdiffstats
path: root/t/chainlint/function.expect
blob: dd7c997a3c340d633d9cbf7a78f4b29727a22ce4 (plain)
1
2
3
4
5
6
7
8
9
10
11
sha1_file() {
	echo "$*" | sed "s#..#.git/objects/&/#"
} &&

remove_object() {
	file=$(sha1_file "$*") &&
	test -e "$file" ?!AMP?!
	rm -f "$file"
} ?!AMP?!

sha1_file arg && remove_object arg