From: Dennis Stosberg <dennis@stosberg.net>
To: Petr Baudis <pasky@suse.cz>
Cc: git@vger.kernel.org
Subject: [PATCH] cg-clean fails on files beginning with a dash
Date: Mon, 29 May 2006 17:06:52 +0200 [thread overview]
Message-ID: <20060529150652.G6dba4ec3@leonov.stosberg.net> (raw)
Reproducible with:
$ git init-db
$ echo "some text" >-file
$ cg clean
Removing -file
rm: invalid option -- l
Try `rm --help' for more information.
Signed-off-by: Dennis Stosberg <dennis@stosberg.net>
---
cg-clean | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/cg-clean b/cg-clean
index 5f438eb..fe611ac 100755
--- a/cg-clean
+++ b/cg-clean
@@ -67,13 +67,13 @@ while read -r file; do
if [ "$cleandirhard" ]; then
chmod -R 700 "$file"
fi
- $rm -rf "$file"
+ $rm -rf -- "$file"
if [ -e "$file" -o -L "$file" ]; then
echo "Cannot remove $file"
fi
elif [ -e "$file" -o -L "$file" ]; then
[ "$quiet" ] || echo "Removing $file"
- "$rm" -f "$file"
+ "$rm" -f -- "$file"
# rm would complain itself on failure
else
echo "File $file has disappeared!"
--
1.3.3+git20060528-dest1
reply other threads:[~2006-05-29 15:06 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20060529150652.G6dba4ec3@leonov.stosberg.net \
--to=dennis@stosberg.net \
--cc=git@vger.kernel.org \
--cc=pasky@suse.cz \
/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;
as well as URLs for NNTP newsgroup(s).