Re: [PATCH v4] test_dir_is_empty: fix edge cases with newlines and hyphens

2018-09-12 Thread Junio C Hamano
William Chargin writes: > While the `test_dir_is_empty` function appears correct in most normal > use cases, it can improperly pass if a directory contains a filename > with a newline, and can improperly fail if an empty directory looks like > an argument to `ls`. This patch changes the

[PATCH v4] test_dir_is_empty: fix edge cases with newlines and hyphens

2018-09-12 Thread William Chargin
While the `test_dir_is_empty` function appears correct in most normal use cases, it can improperly pass if a directory contains a filename with a newline, and can improperly fail if an empty directory looks like an argument to `ls`. This patch changes the implementation to check that the output of

[PATCH v4] test_dir_is_empty: fix edge cases with newlines and hyphens

2018-09-12 Thread William Chargin
While the `test_dir_is_empty` function appears correct in most normal use cases, it can improperly pass if a directory contains a filename with a newline, and can improperly fail if an empty directory looks like an argument to `ls`. This patch changes the implementation to check that the output of