Junio C Hamano [off-list ref] writes:
list_files() {
# Do not replace this with 'ls "$1"', as "ls" with BSD-lineage
# enables "-A" by default for root and ends up including ".git" and
# such in its output. (Note, though, that running the test suite as
# root is generally not recommended.)
(cd "$1" && printf '%s\n' *)
}
An unrelated tangent, but it took me more time than necessary to
find where these "macros" are defined because
git grep 'check_files () {'
found no matches. That is why I prefer to stress about styles (no,
looking for "check_files *()" is not a solution).