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

[PATCH] git clean: Add test to verify directories aren't removed with a prefix

From
Shawn Bohrer <shawn.bohrer@gmail.com>
Date
Apr 13, 2008, 23:49 UTC
Message-ID
<1208130578-24748-2-git-send-email-shawn.bohrer@gmail.com>
In-Reply-To
<1208130578-24748-1-git-send-email-shawn.bohrer@gmail.com>
Signed-off-by: Shawn Bohrer <shawn.bohrer@gmail.com>
---
 t/t7300-clean.sh |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/t/t7300-clean.sh b/t/t7300-clean.sh
index afccfc9..a50492f 100755
--- a/t/t7300-clean.sh
+++ b/t/t7300-clean.sh
@@ -75,8 +75,8 @@ test_expect_success 'git-clean src/ src/' '
 
 test_expect_success 'git-clean with prefix' '
 
-	mkdir -p build docs &&
-	touch a.out src/part3.c docs/manual.txt obj.o build/lib.so &&
+	mkdir -p build docs src/test &&
+	touch a.out src/part3.c docs/manual.txt obj.o build/lib.so src/test/1.c &&
 	(cd src/ && git-clean) &&
 	test -f Makefile &&
 	test -f README &&
@@ -84,6 +84,7 @@ test_expect_success 'git-clean with prefix' '
 	test -f src/part2.c &&
 	test -f a.out &&
 	test ! -f src/part3.c &&
+	test -f src/test/1.c &&
 	test -f docs/manual.txt &&
 	test -f obj.o &&
 	test -f build/lib.so
-- 
1.5.5.106.g42c8b
Previous: Shawn BohrerNext: Joachim Berdal Haga
Message 5 of 14 in “git clean removes directories when not asked to”
  1. Joachim B HagaApr 8, 2008
  2. Joachim B HagaApr 8, 2008
  3. Re: git clean removes directories when not asked toJoachim B Haga, Apr 9, 2008
  4. git clean: Don't automatically remove directories when run within subdirectoryShawn Bohrer, Apr 13, 2008
  5. git clean: Add test to verify directories aren't removed with a prefixShawn Bohrer, Apr 13, 2008
  6. Joachim Berdal HagaApr 14, 2008
  7. Junio C HamanoApr 14, 2008
  8. Shawn BohrerApr 14, 2008
  9. Joachim Berdal HagaApr 14, 2008
  10. Shawn BohrerApr 15, 2008
  11. Joachim Berdal HagaApr 15, 2008
  12. Shawn BohrerApr 15, 2008
  13. Joachim Berdal HagaApr 15, 2008
  14. git clean: Don't automatically remove directories when run within subdirectoryShawn Bohrer, Apr 15, 2008

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.