Re: [PATCH] Add more tests for git-clean
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Nov 4, 2007, 23:35 UTC
- Message-ID
- <7vve8hr3ch.fsf@gitster.siamese.dyndns.org>
- In-Reply-To
- <11942029442710-git-send-email-shawn.bohrer@gmail.com>
Shawn Bohrer <shawn.bohrer@gmail.com> writes:
Show 7 quoted lines
> +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 && > + cd src/ && > + git-clean && > + cd - &&
This is wrong for two reasons.
- Is "cd -" portable?
- What happens when git-clean fails? This test fails, and then it goes on to the next test without cd'ing back.