From: Jim Meyering <jim@meyering.net>
To: git@vger.kernel.org
Subject: git-clean fails to remove a file whose name contains \\, ", or \n, TAB, etc.
Date: Tue, 08 May 2007 22:32:50 +0200 [thread overview]
Message-ID: <87ps5bhx8t.fsf@rho.meyering.net> (raw)
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.
next reply other threads:[~2007-05-08 20:32 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-08 20:32 Jim Meyering [this message]
2007-05-08 20:51 ` git-clean fails to remove a file whose name contains \\, ", or \n, TAB, etc 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ps5bhx8t.fsf@rho.meyering.net \
--to=jim@meyering.net \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox