Re: Re: Re: Microproject | Add more builtin patterns for userdiff
Jacob Kellerwrote: > On Tue, Mar 28, 2017 at 10:53 AM, Pickfire wrote: > > > > Yes, I can't reproduce it outside the test suite. I have added the builtin > > and yet the test fails. test_decode_color gets same output as expect but > > still it fails, should I send in the patch? > > You also need to ensure you have the exact same color settings as used > by the test scripts. > > Thanks, > Jake Yes, I used the same color, looks like the block that are failing is: test_must_fail git diff --no-index "$@" pre post >output
Re: Re: Microproject | Add more builtin patterns for userdiff
Stefan Bellerwrote: > On Tue, Mar 28, 2017 at 3:46 AM, Pickfire wrote: > > > EOF > > > > echo '* diff="cpp"' > .gitmodules > > Did you mean .gitattributes? Yeah, that's a spelling error.
Re: Microproject | Add more builtin patterns for userdiff
On Tue, Mar 28, 2017 at 3:46 AM, Pickfirewrote: > EOF > > echo '* diff="cpp"' > .gitmodules Did you mean .gitattributes?
Re: Re: Microproject | Add more builtin patterns for userdiff
On Tue, Mar 28, 2017 at 10:53 AM, Pickfirewrote: > > Yes, I can't reproduce it outside the test suite. I have added the builtin > and yet the test fails. test_decode_color gets same output as expect but > still it fails, should I send in the patch? You also need to ensure you have the exact same color settings as used by the test scripts. Thanks, Jake
Re: Re: Microproject | Add more builtin patterns for userdiff
Jacob Kellerwrote: > On Tue, Mar 28, 2017 at 3:46 AM, Pickfire wrote: > > While I was working buildins shell patterns for user diffs. I noticed that > > the tests t4034 passes but I can reproduce it manually with: > > > > mkdir cpp/ && cd cpp/ && git init > > > > cat > pre < > Foo():x(0&&1){} > > cout<<"Hello World!\n"< > 1 -1e10 0xabcdef 'x' > > [a] a->b a.b > > !a ~a a++ a-- a*b a > > a*b a/b a%b > > a+b a-b > > a<>b > > ab a>=b > > a==b a!=b > > a > > a^b > > a|b > > a& > > a||b > > a?b:z > > a=b a+=b a-=b a*=b a/=b a%=b a<<=b a>>=b a&=b a^=b a|=b > > a,y > > a::b > > EOF > > > > cat > post < > Foo() : x(0&42) { bar(x); } > > cout<<"Hello World?\n"< > (1) (-1e10) (0xabcdef) 'y' > > [x] x->y x.y > > !x ~x x++ x-- x*y x > > x*y x/y x%y > > x+y x-y > > x<>y > > xy x>=y > > x==y x!=y > > x > > x^y > > x|y > > x& > > x||y > > x?y:z > > x=y x+=y x-=y x*=y x/=y x%=y x<<=y x>>=y x&=y x^=y x|=y > > x,y > > x::y > > EOF > > > > echo '* diff="cpp"' > .gitmodules > > git diff --no-index --color-words pre post > output > > > > Surprisingly, it shows (which is very different from the expected output): > > > > The diff test code uses "test_decode_color" function which decodes the > color commands into human readable text. From the looks of it, you're > trying to reproduce the test outside the test suite. However, you're > not decoding the colors using the test library function, so it doesn't > look right. Yes, I can't reproduce it outside the test suite. I have added the builtin and yet the test fails. test_decode_color gets same output as expect but still it fails, should I send in the patch?
Re: Microproject | Add more builtin patterns for userdiff
On Tue, Mar 28, 2017 at 3:46 AM, Pickfirewrote: > While I was working buildins shell patterns for user diffs. I noticed that > the tests t4034 passes but I can reproduce it manually with: > > mkdir cpp/ && cd cpp/ && git init > > cat > pre < Foo():x(0&&1){} > cout<<"Hello World!\n"< 1 -1e10 0xabcdef 'x' > [a] a->b a.b > !a ~a a++ a-- a*b a > a*b a/b a%b > a+b a-b > a<>b > ab a>=b > a==b a!=b > a > a^b > a|b > a& > a||b > a?b:z > a=b a+=b a-=b a*=b a/=b a%=b a<<=b a>>=b a&=b a^=b a|=b > a,y > a::b > EOF > > cat > post < Foo() : x(0&42) { bar(x); } > cout<<"Hello World?\n"< (1) (-1e10) (0xabcdef) 'y' > [x] x->y x.y > !x ~x x++ x-- x*y x > x*y x/y x%y > x+y x-y > x<>y > xy x>=y > x==y x!=y > x > x^y > x|y > x& > x||y > x?y:z > x=y x+=y x-=y x*=y x/=y x%=y x<<=y x>>=y x&=y x^=y x|=y > x,y > x::y > EOF > > echo '* diff="cpp"' > .gitmodules > git diff --no-index --color-words pre post > output > > Surprisingly, it shows (which is very different from the expected output): > The diff test code uses "test_decode_color" function which decodes the color commands into human readable text. From the looks of it, you're trying to reproduce the test outside the test suite. However, you're not decoding the colors using the test library function, so it doesn't look right. Thanks, Jake
Microproject | Add more builtin patterns for userdiff
While I was working buildins shell patterns for user diffs. I noticed that the tests t4034 passes but I can reproduce it manually with: mkdir cpp/ && cd cpp/ && git init cat > pre b ab a>=b a==b a!=b a a^b a|b a& a||b a?b:z a=b a+=b a-=b a*=b a/=b a%=b a<<=b a>>=b a&=b a^=b a|=b a,y a::b EOF cat > posty xy x>=y x==y x!=y x x^y x|y x& x||y x?y:z x=y x+=y x-=y x*=y x/=y x%=y x<<=y x>>=y x&=y x^=y x|=y x,y x::y EOF echo '* diff="cpp"' > .gitmodules git diff --no-index --color-words pre post > output Surprisingly, it shows (which is very different from the expected output): ^[[1mdiff --git a/pre b/post^[[m ^[[1mindex 23d5c8a..7e8c026 100644^[[m ^[[1m--- a/pre^[[m ^[[1m+++ b/post^[[m ^[[36m@@ -1,19 +1,19 @@^[[m ^[[31mFoo():x(0&&1){}^[[m^[[32mFoo() : x(0&42) { bar(x); }^[[m cout<<"Hello ^[[31mWorld!\n"< b a.b^[[m ^[[31m!a ~a a++ a-- a*b a^[[m ^[[31ma*b a/b a%b^[[m ^[[31ma+b a-b^[[m ^[[31ma<>b^[[m ^[[31mab a>=b^[[m ^[[31ma==b a!=b^[[m ^[[31ma^[[m ^[[31ma^b^[[m ^[[31ma|b^[[m ^[[31ma&^[[m ^[[31ma||b^[[m ^[[31ma?b:z^[[m ^[[31ma=b a+=b a-=b a*=b a/=b a%=b a<<=b a>>=b a&=b a^=b a|=b^[[m ^[[31ma,y^[[m ^[[31ma::b^[[m^[[32mWorld?\n"< y x.y^[[m ^[[32m!x ~x x++ x-- x*y x^[[m ^[[32mx*y x/y x%y^[[m ^[[32mx+y x-y^[[m ^[[32mx<>y^[[m ^[[32mxy x>=y^[[m ^[[32mx==y x!=y^[[m ^[[32mx^[[m ^[[32mx^y^[[m ^[[32mx|y^[[m ^[[32mx&^[[m ^[[32mx||y^[[m ^[[32mx?y:z^[[m ^[[32mx=y x+=y x-=y x*=y x/=y x%=y x<<=y x>>=y x&=y x^=y x|=y^[[m ^[[32mx,y^[[m ^[[32mx::y^[[m Instead of: diff --git a/pre b/post index 23d5c8a..7e8c026 100644 --- a/pre +++ b/post @@ -1,19 +1,19 @@ Foo() : x(0&&1&42) { bar(x); } cout<<"Hello World!?\n"< b ay x.by !ax ~a ax x++ ax-- ax*b ay x&b ay x*b ay x/b ay x%b ay x+b ay x-b ay x<>b ay xb ay x>=b ay x==b ay x!=b ay x&b ay x^b ay x|b ay x&&b ay x||b ay x?by:z ax=b ay x+=b ay x-=b ay x*=b ay x/=b ay x%=b ay x<<=b ay x>>=b ay x&=b ay x^=b ay x|=b ay x,y ax::by That's does not just happens to cpp builtins, it happens to bibtex as well. Is it that I had missed some configuration since I have tested this on a few machines? I have a workaround for that, which is to run log with --color-words= with regex from the userdiff.c, does it automatically use the builtins diff?