threads / patch / 4341

patchgit-clean fails on files beginning with a dash

Subject: [PATCH] git-clean fails on files beginning with a dash

## tl;dr

2 messages between May 29, 2006 and May 30, 2006. Diffs are folded; open one to read it.

replies: 1people: 2as markdown or json

Dennis Stosberg· May 29, 2006, 15:06 UTC · lore
Reproducible with:

$ git init-db $ echo "some text" >-file $ git clean Removing -file rm: invalid option -- l Try `rm --help' for more information.

Signed-off-by: Dennis Stosberg <dennis@stosberg.net>
---
 git-clean.sh |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
Show changes to git-clean.sh +2 −2
diff --git a/git-clean.sh b/git-clean.sh
index bb56264..3834323 100755
--- a/git-clean.sh
+++ b/git-clean.sh
@@ -19,8 +19,8 @@ ignored=
 ignoredonly=
 cleandir=
 quiet=
-rmf="rm -f"
-rmrf="rm -rf"
+rmf="rm -f --"
+rmrf="rm -rf --"
 rm_refuse="echo Not removing"
 echo1="echo"
 
-- 
1.3.3+git20060528-dest1
Junio C Hamano· May 30, 2006, 08:49 UTC · re: Dennis Stosberg · lore

Re: [PATCH] git-clean fails on files beginning with a dash

Dennis Stosberg <dennis@stosberg.net> writes:
Show 8 quoted lines
> Reproducible with:
>
> $ git init-db
> $ echo "some text" >-file
> $ git clean
> Removing -file
> rm: invalid option -- l
> Try `rm --help' for more information.
Thanks.

← back to recent threads