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

Re: * [BUG] "git clean" does not pay attention to its parameters

From
Jeff King <peff@peff.net>
Date
Dec 6, 2007, 03:28 UTC
Message-ID
<20071206032806.GB5499@coredump.intra.peff.net>
In-Reply-To
<7veje1zibm.fsf@gitster.siamese.dyndns.org>
On Tue, Dec 04, 2007 at 11:55:41PM -0800, Junio C Hamano wrote:
> [PATCH] git-clean: Honor pathspec.
> 
> git-clean "*.rej" should attempt to look at only paths that match
> pattern "*.rej", but rewrite to C broke it.

And here is a test that fails without your patch (probably the commit message should say "fixed in XX" once the commit id is known, or it should be squashed in with your patch).

-- >8 -- t7300: add test for clean with wildcard pathspec

Signed-off-by: Jeff King <peff@peff.net>
---
 t/t7300-clean.sh |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/t/t7300-clean.sh b/t/t7300-clean.sh
index f013c17..dfd1188 100755
--- a/t/t7300-clean.sh
+++ b/t/t7300-clean.sh
@@ -126,6 +126,20 @@ test_expect_success 'git-clean symbolic link' '
 
 '
 
+test_expect_success 'git-clean with wildcard' '
+
+	touch a.clean b.clean other.c &&
+	git-clean "*.clean" &&
+	test -f Makefile &&
+	test -f README &&
+	test -f src/part1.c &&
+	test -f src/part2.c &&
+	test ! -f a.clean &&
+	test ! -f b.clean &&
+	test -f other.c
+
+'
+
 test_expect_success 'git-clean -n' '
 
 	mkdir -p build docs &&
-- 
1.5.3.7.2099.gd6d7-dirty
Previous: Jeff King
Message 9 of 9 in “[BUG] "git clean" does not pay attention to its parameters”
  1. Nanako ShiraishiDec 5, 2007
  2. Junio C HamanoDec 5, 2007
  3. Johannes SchindelinDec 5, 2007
  4. Junio C HamanoDec 5, 2007
  5. Sam RavnborgDec 5, 2007
  6. Shawn BohrerDec 5, 2007
  7. Junio C HamanoDec 6, 2007
  8. Jeff KingDec 5, 2007
  9. Jeff KingDec 6, 2007

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.