git-clean fails to remove a file whose name contains \\, ", or \n, TAB, etc.
From: Jim Meyering <hidden>
Date: 2016-06-15 22:43:09
From: Jim Meyering <hidden>
Date: 2016-06-15 22:43:09
Not that it matters (or maybe this is a feature :-), because people
who create such files in their working directory deserve what they
get, Eh? :-)
But if leaving it, then perhaps git-clean should at least warn
that it's not doing its job (i.e. remove the uses of rm's "-f").
To reproduce, run these commands:
nl='
'
git-init > /dev/null && touch "x\\n\"$nl" && git-clean && ls -b
Here's the output I get:
Removing "x\\n\"\n"
.git/ x\\n"\n
git-clean.sh needs to strip off leading and trailing double quotes (easy)
as well as convert escapees back to originals (not easy as you might
think, in sh) before running rm. Good excuse to rewrite it in perl.