Re: [PATCH v1 1/3] t6038; use crlf on all platforms
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- May 15, 2016, 06:42 UTC
- Message-ID
- <CAPig+cRj_=+hBw_BpBHfJLwBmMH1k8w1S1WMFes2avSOOkc77g@mail.gmail.com>
- In-Reply-To
- <1463294280-20176-1-git-send-email-tboegi@web.de>
On Sun, May 15, 2016 at 2:38 AM, <tboegi@web.de> wrote:
> t6038 uses different code, dependig if NATIVE_CRLF is set ot not.
s/dependig/depending/ s/ot/or/
Show 5 quoted lines
> When the native line endings are LF, merge.renormalize is not tested very well. > Change the test to always use CRLF by setting core.eol=crlf. > After doing so, the test fails: > [...snip...] > This will be addressed in the next commit.
Does this mean that the below tests now fail? If so, they should be switched to use test_expect_failure here, and then swapped back to test_expect_success in the patch which fixes the problem.
Show 79 quoted lines
> --- > diff --git a/t/t6038-merge-text-auto.sh b/t/t6038-merge-text-auto.sh > index 85c10b0..4dc8c1a 100755 > --- a/t/t6038-merge-text-auto.sh > +++ b/t/t6038-merge-text-auto.sh > @@ -18,6 +18,7 @@ test_have_prereq SED_STRIPS_CR && SED_OPTIONS=-b > > test_expect_success setup ' > git config core.autocrlf false && > + git config core.eol crlf && > > echo first line | append_cr >file && > echo first line >control_file && > @@ -72,10 +73,8 @@ test_expect_success 'Merge after setting text=auto' ' > same line > EOF > > - if test_have_prereq NATIVE_CRLF; then > - append_cr <expected >expected.temp && > - mv expected.temp expected > - fi && > + append_cr <expected >expected.temp && > + mv expected.temp expected && > git config merge.renormalize true && > git rm -fr . && > rm -f .gitattributes && > @@ -90,10 +89,8 @@ test_expect_success 'Merge addition of text=auto' ' > same line > EOF > > - if test_have_prereq NATIVE_CRLF; then > - append_cr <expected >expected.temp && > - mv expected.temp expected > - fi && > + append_cr <expected >expected.temp && > + mv expected.temp expected && > git config merge.renormalize true && > git rm -fr . && > rm -f .gitattributes && > @@ -104,15 +101,9 @@ test_expect_success 'Merge addition of text=auto' ' > > test_expect_success 'Detect CRLF/LF conflict after setting text=auto' ' > echo "<<<<<<<" >expected && > - if test_have_prereq NATIVE_CRLF; then > - echo first line | append_cr >>expected && > - echo same line | append_cr >>expected && > - echo ======= | append_cr >>expected > - else > - echo first line >>expected && > - echo same line >>expected && > - echo ======= >>expected > - fi && > + echo first line | append_cr >>expected && > + echo same line | append_cr >>expected && > + echo ======= | append_cr >>expected && > echo first line | append_cr >>expected && > echo same line | append_cr >>expected && > echo ">>>>>>>" >>expected && > @@ -128,15 +119,9 @@ test_expect_success 'Detect LF/CRLF conflict from addition of text=auto' ' > echo "<<<<<<<" >expected && > echo first line | append_cr >>expected && > echo same line | append_cr >>expected && > - if test_have_prereq NATIVE_CRLF; then > - echo ======= | append_cr >>expected && > - echo first line | append_cr >>expected && > - echo same line | append_cr >>expected > - else > - echo ======= >>expected && > - echo first line >>expected && > - echo same line >>expected > - fi && > + echo ======= | append_cr >>expected && > + echo first line | append_cr >>expected && > + echo same line | append_cr >>expected && > echo ">>>>>>>" >>expected && > git config merge.renormalize false && > rm -f .gitattributes && > -- > 2.0.0.rc1.6318.g0c2c796