Raw
1 test_expect_success 'function' '
2 # LINT: "()" in function definition not mistaken for subshell
3 sha1_file() {
4 echo "$*" | sed "s#..#.git/objects/&/#"
5 } &&
6
7 # LINT: broken &&-chain in function and after function
8 remove_object() {
9 file=$(sha1_file "$*") &&
10 test -e "$file"
11 rm -f "$file"
12 }
13
14 sha1_file arg && remove_object arg
15 '