interplane.Get Omega
Read in your language

git

[Ported from github.com/git/git] Sync with Git 2.56.1

Brought by drakestapleton

branch master Branches Tags History

git / t / chainlint / function.test

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