Git development
 help / color / mirror / Atom feed
* git-clean fails to remove a file whose name contains \\, ", or \n, TAB, etc.
@ 2007-05-08 20:32 Jim Meyering
  2007-05-08 20:51 ` Randal L. Schwartz
  0 siblings, 1 reply; 8+ messages in thread
From: Jim Meyering @ 2007-05-08 20:32 UTC (permalink / raw)
  To: git

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.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2007-05-08 23:38 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-08 20:32 git-clean fails to remove a file whose name contains \\, ", or \n, TAB, etc Jim Meyering
2007-05-08 20:51 ` Randal L. Schwartz
2007-05-08 20:53   ` Junio C Hamano
2007-05-08 23:11   ` Jan Hudec
2007-05-08 23:18     ` Randal L. Schwartz
2007-05-08 23:27       ` Karl Hasselström
2007-05-08 23:29         ` Randal L. Schwartz
2007-05-08 23:38           ` Karl Hasselström

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox