From: David Kastrup Date: Tue, 25 Mar 2014 21:06:36 GMT Subject: Re: [RFC/PATCH 1/4] test-lib: add test_dir_is_empty() Message-ID: <87y4zyt2cj.fsf@fencepost.gnu.org> In-Reply-To: Junio C Hamano writes: > Jens Lehmann writes: > >> For the upcoming submodule test framework we often need to assert that an >> empty directory exists in the work tree. Add the test_dir_is_empty() >> function which asserts that the given argument is an empty directory. >> >> Signed-off-by: Jens Lehmann >> --- >> >> I believe this one is pretty straightforward (unless I missed that this >> functionality already exists someplace I forgot to look ;-). > > I am not very thrilled to see that it depends on "." and ".." to > always exist, which may be true for all POSIX filesystems, but > still... Not even there, though few people will likely use / as their work tree... -- David Kastrup