Thanks Samuel, That example showed that there must be something wrong in my .git directory, because with it, I'm getting the correct output. Moving the same lines to my .git/config didn't work. On Wed, Feb 8, 2017 at 3:46 PM, Samuel Lijin <sxlijin@xxxxxxxxx> wrote: > I just put this togther: https://github.com/sxlijin/xfuncname-test > > Try cloning and then for any of config1 thru 3, > > $ cp configX .git/config > $ git diff HEAD^ -- test.natvis > > On Wed, Feb 8, 2017 at 2:42 PM, Jack Adrian Zappa <adrianh.bsc@xxxxxxxxx> wrote: >> Thanks Samuel, >> >> So, the question is, what is causing this problem on my system? >> >> Anyone have an idea to help diagnose this problem? >> >> On Wed, Feb 8, 2017 at 3:24 PM, Samuel Lijin <sxlijin@xxxxxxxxx> wrote: >>> On Windows 7, it works for me in both CMD and Git Bash: >>> >>> $ git --version >>> git version 2.11.0.windows.3 >>> >>> $ git diff HEAD^ --word-diff >>> diff --git a/test.natvis b/test.natvis >>> index 93396ad..1233b8c 100644 >>> --- a/test.natvis >>> +++ b/test.natvis >>> @@ -18,6 +18,7 @@ test >>> >>> >>> <!-- Non-blank line --> >>> {+<Item Name="added var">added_var</Item>+} >>> >>> >>> <Item Name="var2">var2</Item> >>> >>> On Wed, Feb 8, 2017 at 12:37 PM, René Scharfe <l.s.r@xxxxxx> wrote: >>>> Am 08.02.2017 um 18:11 schrieb Jack Adrian Zappa: >>>>> Thanks Rene, but you seem to have missed the point. NOTHING is >>>>> working. No matter what I put there, it doesn't seem to get matched. >>>> >>>> I'm not so sure about that. With your example I get this diff without >>>> setting diff.natvis.xfuncname: >>>> >>>> diff --git a/a.natvis b/a.natvis >>>> index 7f9bdf5..bc3c090 100644 >>>> --- a/a.natvis >>>> +++ b/a.natvis >>>> @@ -19,7 +19,7 @@ xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010"> >>>> >>>> >>>> <!-- Non-blank line --> >>>> - <Item Name="added var">added_var</Item> >>>> + <Item Name="added var">added_vars</Item> >>>> >>>> >>>> <Item Name="var2">var2</Item> >>>> >>>> Note the XML namespace in the hunk header. It's put there by the >>>> default rule because "xmlns" starts at the beginning of the line. Your >>>> diff has nothing there, which means the default rule is not used, i.e. >>>> your user-defined rule is in effect. >>>> >>>> Come to think of it, this line break in the middle of the AutoVisualizer >>>> tab might have been added by your email client unintentionally, so that >>>> we use different test files, which then of course results in different >>>> diffs. Is that the case? >>>> >>>> Anyway, if I run the following two commands: >>>> >>>> $ git config diff.natvis.xfuncname "^[\t ]*<Type[\t ]+Name=\"([^\"]+)\".*$" >>>> $ echo '*.natvis diff=natvis' >.gitattributes >>>> >>>> ... then I get this, both on Linux (git version 2.11.1) and on Windows >>>> (git version 2.11.1.windows.1): >>>> >>>> diff --git a/a.natvis b/a.natvis >>>> index 7f9bdf5..bc3c090 100644 >>>> --- a/a.natvis >>>> +++ b/a.natvis >>>> @@ -19,7 +19,7 @@ test >>>> >>>> >>>> <!-- Non-blank line --> >>>> - <Item Name="added var">added_var</Item> >>>> + <Item Name="added var">added_vars</Item> >>>> >>>> >>>> <Item Name="var2">var2</Item> >>>> >>>>> Just to be sure, I tested your regex and again it didn't work. >>>> >>>> At this point I'm out of ideas, sorry. :( The only way I was able to >>>> break it was due to mistyping the extension as "netvis" several times >>>> for some reason. >>>> >>>> René