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