Re: [PATCH 1/2] t1300: put git invocations inside test function
- From
Johannes Sixt <j.sixt@viscovery.net>
- Date
- Oct 19, 2011, 06:41 UTC
- Message-ID
- <4E9E7115.60303@viscovery.net>
- In-Reply-To
- <20111012182920.GA18948@sigill.intra.peff.net>
Am 10/12/2011 20:29, schrieb Jeff King:
Show 28 quoted lines
> @@ -750,13 +759,6 @@ test_expect_success NOT_MINGW 'get --path copes with unset $HOME' ' > test_cmp expect result > ' > > -rm .git/config > - > -git config quote.leading " test" > -git config quote.ending "test " > -git config quote.semicolon "test;test" > -git config quote.hash "test#test" > - > cat > expect << EOF > [quote] > leading = " test" > @@ -764,8 +766,14 @@ cat > expect << EOF > semicolon = "test;test" > hash = "test#test" > EOF > - > -test_expect_success 'quoting' 'cmp .git/config expect' > +test_expect_success 'quoting' ' > + rm .git/config && > + git config quote.leading " test" && > + git config quote.ending "test " && > + git config quote.semicolon "test;test" && > + git config quote.hash "test#test" && > + test_cmp expect .git/config > +'
This innocently looking hunk fails on Windows, because the preceding tests are skipped, and .git/config does not exist. I was tempted to just change this to 'rm -f'. But there are a few other instances of 'rm .git/config' in this file that were *not* moved inside the test function.
How would you like this solved?
- Move this one out again - Add -f to just this one - Add -f everywhere - a combination of the above?
-- Hannes