git-clean fails to remove a file whose name contains \\, ", or \n, TAB, etc.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux