summaryrefslogtreecommitdiffstats
path: root/t/chainlint/function.test
blob: 5ee59562c93f365d6f990bf4dab0c90fb017c6bb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
# LINT: "()" in function definition not mistaken for subshell
sha1_file() {
	echo "$*" | sed "s#..#.git/objects/&/#"
} &&

# LINT: broken &&-chain in function and after function
remove_object() {
	file=$(sha1_file "$*") &&
	test -e "$file"
	rm -f "$file"
}

sha1_file arg && remove_object arg