1
0
Fork 0
git/t/chainlint/function.test
Daniel Baumann 54102a2c29
Adding upstream version 1:2.47.2.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-23 07:43:39 +02:00

15 lines
328 B
Text

test_expect_success 'function' '
# 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
'