git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
DSDennis Stosberg <dennis@stosberg.net>
Date
May 29, 2006, 15:06 UTC
Message-ID
<20060529150632.G6794bab6@leonov.stosberg.net>
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(-)
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
Next: Junio C Hamano
Message 1 of 2 in “git-clean fails on files beginning with a dash”
  1. git-clean fails on files beginning with a dashDennis Stosberg, May 29, 2006
  2. Junio C HamanoMay 30, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.