Michael J Gruber [off-list ref] writes:
-z makes clean output only the names of paths which are or would be
deleted, and separates them with \0.
My first reaction was: Is it not a job for "git ls-files"?
Actually, you already almost have it:
git clean -d => git ls-files --exclude-standard --directory -o
git clean -dx => git ls-files -z --exclude-standard --directory -io
OTOH, the "git clean" without -d are not exposed directly AFAICT, and
the set of options of "git clean" may make more sense.
--
Matthieu Moy
http://www-verimag.imag.fr/~moy/