Code

git-clean fails on files beginning with a dash
authorDennis Stosberg <dennis@stosberg.net>
Mon, 29 May 2006 15:06:32 +0000 (17:06 +0200)
committerJunio C Hamano <junkio@cox.net>
Tue, 30 May 2006 06:14:51 +0000 (23:14 -0700)
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>
Signed-off-by: Junio C Hamano <junkio@cox.net>
git-clean.sh

index bb56264e046c906c529c712b36db239dd7ba99e9..3834323bcf479b7e01af4e1f247fb13aac423f90 100755 (executable)
@@ -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"