{"thread":{"id":"45073","subject":"Trying to use xfuncname without success.","startedAt":"2017-02-07T19:22:20Z","lastAt":"2017-02-10T17:59:40Z","messageCount":14,"participants":["Jack Adrian Zappa","René Scharfe","Samuel Lijin"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"310995","messageId":"CAKepmajNz7TP_Z6p_Wj17tOpiMOpKkvQOBvVthBkEiKabAppjg@mail.gmail.com","threadId":"45073","inReplyTo":null,"subject":"Trying to use xfuncname without success.","fromName":"Jack Adrian Zappa","fromEmail":"adrianh.bsc@gmail.com","sentAt":"2017-02-07T19:21:13Z","receivedAt":"2017-02-07T19:22:20Z","isPatch":false,"sender":{"key":"adrianh.bsc@gmail.com","avatar":null},"body":"I'm trying to specify a hunk header using xfuncname, and it just\ndoesn't want to work.\n\nThe full question is on SO here:\n\nhttp://stackoverflow.com/questions/42078376/why-isnt-my-xfuncname-working-in-my-gitconfig-file\n\nBut the basic gist is that no matter what regex I specify, git will\nnot recognise the hunk header.  Am I doing something wrong or is this\na bug?\n\nFor those who don't want to jump to the SO site, I've copied the text below:\n\n-----8<--------8<--------8<--------8<--------8<--------8<--------8<--------8<---\n\nI'm trying to setup a hunk header for .natvis files. For some reason,\nit doesn't seem to be working. I'm following their instructions from\nhere, which doesn't say much in terms of restrictions of the regex,\nsuch as, is the matched item considered the hunk header or do I need a\ngroup? I have tried both with no success. This is what I have:\n\n[diff \"natvis\"]\n    xfuncname = \"^[\\\\\\t ]*<Type[\\\\\\t ]+Name=\\\"([^\\\"])\\\".*$\"\n\nI've also added to my .gitattributes file (even though I'm not\npositive that it is necessary):\n\n*.natvis diff=natvis\n\nI've tried \\t instead of \\\\\\t as well as replacing the entire regex\nwith just <Type.* with no luck. I'm using git version 2.7.0.windows.1\non Windows 8.1. EDIT: I upgraded to git version 2.11.1.windows.1 on\nWindows 8.1 and even tried git version 2.8.3 on cygwin64 on Windows\n8.1 with the same results.\n\nAs a test file, I have the following test.natvis file:\n\n<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<AutoVisualizer\nxmlns=\"http://schemas.microsoft.com/vstudio/debugger/natvis/2010\">\n\n  <Type Name=\"test\">\n    <Expand>\n      <Item Name=\"var\">var</Item>\n\n\n\n\n\n\n\n\n\n\n\n\n\n      <!-- Non-blank line -->\n      <Item Name=\"added var\">added_var</Item>\n\n\n      <Item Name=\"var2\">var2</Item>\n    </Expand>\n  </Type>\n</AutoVisualizer>\n\nwith the <Item Name=\"added var\">added_var</Item> being the new line added.\n\nI'm really not sure why this is so difficult.\n\nEDIT:\n\nHere is a sample output of what I am getting:\n\n$ git diff --word-diff\ndiff --git a/test.natvis b/test.natvis\nindex 73c06bc..bc0f549 100644\n--- a/test.natvis\n+++ b/test.natvis\n@@ -18,6 +18,7 @@\n\n\n      <!-- Non-blank line -->\n      {+<Item Name=\"added var\">added_var</Item>+}\n\n\n      <Item Name=\"var2\">var2</Item>\nwarning: LF will be replaced by CRLF in test.natvis.\nThe file will have its original line endings in your working directory.\n\nEven using xfuncname = \"^.*$\" I would have expected that <!--\nNon-blank line --> would have shown up as my hunk header, but I get\nnothing. :(\n\nEDIT:\n\nI've tried the solution proposed by torek, but to no avail. It's like\nit doesn't know what to do with the xfuncname entry. :(\n"},{"id":"311017","messageId":"271989d5-c383-0c0d-bfcb-f4118f9fa2aa@web.de","threadId":"45073","inReplyTo":"CAKepmajNz7TP_Z6p_Wj17tOpiMOpKkvQOBvVthBkEiKabAppjg@mail.gmail.com","subject":"Re: Trying to use xfuncname without success.","fromName":"René Scharfe","fromEmail":"l.s.r@web.de","sentAt":"2017-02-07T23:18:26Z","receivedAt":"2017-02-07T23:25:16Z","isPatch":false,"sender":{"key":"l.s.r@web.de","avatar":"https://avatars.githubusercontent.com/u/26122331?v=4"},"body":"Am 07.02.2017 um 20:21 schrieb Jack Adrian Zappa:\n> I'm trying to setup a hunk header for .natvis files. For some reason,\n> it doesn't seem to be working. I'm following their instructions from\n> here, which doesn't say much in terms of restrictions of the regex,\n> such as, is the matched item considered the hunk header or do I need a\n> group? I have tried both with no success. This is what I have:\n>\n> [diff \"natvis\"]\n>     xfuncname = \"^[\\\\\\t ]*<Type[\\\\\\t ]+Name=\\\"([^\\\"])\\\".*$\"\n\nThe extra \"\\\\\" allow backslashes to be used for indentation as well as \nbetween Type and Name, which is probably not what you want.  And your \nexpression only matches single-char Name attributes.  Try:\n\n\txfuncname = \"^[\\t ]*<Type[\\t ]+Name=\\\"([^\\\"]+)\\\".*$\"\n\nRené\n"},{"id":"311070","messageId":"CAKepmagp2mXNviA2VdT=3EQtZi2LkA_5oG6=AbfkBGKP9Hqiiw@mail.gmail.com","threadId":"45073","inReplyTo":"271989d5-c383-0c0d-bfcb-f4118f9fa2aa@web.de","subject":"Re: Trying to use xfuncname without success.","fromName":"Jack Adrian Zappa","fromEmail":"adrianh.bsc@gmail.com","sentAt":"2017-02-08T17:11:29Z","receivedAt":"2017-02-08T17:11:46Z","isPatch":false,"sender":{"key":"adrianh.bsc@gmail.com","avatar":null},"body":"Thanks Rene, but you seem to have missed the point.  NOTHING is\nworking.  No matter what I put there, it doesn't seem to get matched.\n\nJust to be sure, I tested your regex and again it didn't work.\n\nSomeone on the SO site stated they could get it to work on FreeBSD and\nI'm on Windows, so this might be a platform thing.  Can anyone else on\nWindows please confirm?\n\nThanks,\n\n\nA\n\nOn Tue, Feb 7, 2017 at 6:18 PM, René Scharfe <l.s.r@web.de> wrote:\n> Am 07.02.2017 um 20:21 schrieb Jack Adrian Zappa:\n>>\n>> I'm trying to setup a hunk header for .natvis files. For some reason,\n>> it doesn't seem to be working. I'm following their instructions from\n>> here, which doesn't say much in terms of restrictions of the regex,\n>> such as, is the matched item considered the hunk header or do I need a\n>> group? I have tried both with no success. This is what I have:\n>>\n>> [diff \"natvis\"]\n>>     xfuncname = \"^[\\\\\\t ]*<Type[\\\\\\t ]+Name=\\\"([^\\\"])\\\".*$\"\n>\n>\n> The extra \"\\\\\" allow backslashes to be used for indentation as well as\n> between Type and Name, which is probably not what you want.  And your\n> expression only matches single-char Name attributes.  Try:\n>\n>         xfuncname = \"^[\\t ]*<Type[\\t ]+Name=\\\"([^\\\"]+)\\\".*$\"\n>\n> René\n"},{"id":"311076","messageId":"1aa20b4e-782f-a650-eab8-51218b838337@web.de","threadId":"45073","inReplyTo":"CAKepmagp2mXNviA2VdT=3EQtZi2LkA_5oG6=AbfkBGKP9Hqiiw@mail.gmail.com","subject":"Re: Trying to use xfuncname without success.","fromName":"René Scharfe","fromEmail":"l.s.r@web.de","sentAt":"2017-02-08T18:37:49Z","receivedAt":"2017-02-08T18:45:07Z","isPatch":false,"sender":{"key":"l.s.r@web.de","avatar":"https://avatars.githubusercontent.com/u/26122331?v=4"},"body":"Am 08.02.2017 um 18:11 schrieb Jack Adrian Zappa:\n> Thanks Rene, but you seem to have missed the point.  NOTHING is\n> working.  No matter what I put there, it doesn't seem to get matched.\n\nI'm not so sure about that.  With your example I get this diff without\nsetting diff.natvis.xfuncname:\n\ndiff --git a/a.natvis b/a.natvis\nindex 7f9bdf5..bc3c090 100644\n--- a/a.natvis\n+++ b/a.natvis\n@@ -19,7 +19,7 @@ xmlns=\"http://schemas.microsoft.com/vstudio/debugger/natvis/2010\">\n \n \n       <!-- Non-blank line -->\n-      <Item Name=\"added var\">added_var</Item>\n+      <Item Name=\"added var\">added_vars</Item>\n \n \n       <Item Name=\"var2\">var2</Item>\n\nNote the XML namespace in the hunk header.  It's put there by the\ndefault rule because \"xmlns\" starts at the beginning of the line.  Your\ndiff has nothing there, which means the default rule is not used, i.e.\nyour user-defined rule is in effect.\n\nCome to think of it, this line break in the middle of the AutoVisualizer\ntab might have been added by your email client unintentionally, so that\nwe use different test files, which then of course results in different\ndiffs.  Is that the case?\n\nAnyway, if I run the following two commands:\n\n$ git config diff.natvis.xfuncname \"^[\\t ]*<Type[\\t ]+Name=\\\"([^\\\"]+)\\\".*$\"\n$ echo '*.natvis diff=natvis' >.gitattributes\n\n... then I get this, both on Linux (git version 2.11.1) and on Windows\n(git version 2.11.1.windows.1):\n\ndiff --git a/a.natvis b/a.natvis\nindex 7f9bdf5..bc3c090 100644\n--- a/a.natvis\n+++ b/a.natvis\n@@ -19,7 +19,7 @@ test\n \n \n       <!-- Non-blank line -->\n-      <Item Name=\"added var\">added_var</Item>\n+      <Item Name=\"added var\">added_vars</Item>\n \n \n       <Item Name=\"var2\">var2</Item>\n\n> Just to be sure, I tested your regex and again it didn't work.\n\nAt this point I'm out of ideas, sorry. :(  The only way I was able to\nbreak it was due to mistyping the extension as \"netvis\" several times\nfor some reason.\n\nRené\n"},{"id":"311082","messageId":"CAJZjrdXjnDMi8gMY6f_UDbMZrZJ=AoPM+g01hqPCO2pB9csoOw@mail.gmail.com","threadId":"45073","inReplyTo":"1aa20b4e-782f-a650-eab8-51218b838337@web.de","subject":"Re: Trying to use xfuncname without success.","fromName":"Samuel Lijin","fromEmail":"sxlijin@gmail.com","sentAt":"2017-02-08T20:24:32Z","receivedAt":"2017-02-08T20:25:33Z","isPatch":false,"sender":{"key":"sxlijin@gmail.com","avatar":"https://gravatar.com/avatar/01777bf1eae64e2b4dca97dcac182a6abbcf6fd8cb4d5b8fa33edf9f8cc21746?d=mp&s=160"},"body":"On Windows 7, it works for me in both CMD and Git Bash:\n\n$ git --version\ngit version 2.11.0.windows.3\n\n$ git diff HEAD^ --word-diff\ndiff --git a/test.natvis b/test.natvis\nindex 93396ad..1233b8c 100644\n--- a/test.natvis\n+++ b/test.natvis\n@@ -18,6 +18,7 @@ test\n\n\n      <!-- Non-blank line -->\n      {+<Item Name=\"added var\">added_var</Item>+}\n\n\n      <Item Name=\"var2\">var2</Item>\n\nOn Wed, Feb 8, 2017 at 12:37 PM, René Scharfe <l.s.r@web.de> wrote:\n> Am 08.02.2017 um 18:11 schrieb Jack Adrian Zappa:\n>> Thanks Rene, but you seem to have missed the point.  NOTHING is\n>> working.  No matter what I put there, it doesn't seem to get matched.\n>\n> I'm not so sure about that.  With your example I get this diff without\n> setting diff.natvis.xfuncname:\n>\n> diff --git a/a.natvis b/a.natvis\n> index 7f9bdf5..bc3c090 100644\n> --- a/a.natvis\n> +++ b/a.natvis\n> @@ -19,7 +19,7 @@ xmlns=\"http://schemas.microsoft.com/vstudio/debugger/natvis/2010\">\n>\n>\n>        <!-- Non-blank line -->\n> -      <Item Name=\"added var\">added_var</Item>\n> +      <Item Name=\"added var\">added_vars</Item>\n>\n>\n>        <Item Name=\"var2\">var2</Item>\n>\n> Note the XML namespace in the hunk header.  It's put there by the\n> default rule because \"xmlns\" starts at the beginning of the line.  Your\n> diff has nothing there, which means the default rule is not used, i.e.\n> your user-defined rule is in effect.\n>\n> Come to think of it, this line break in the middle of the AutoVisualizer\n> tab might have been added by your email client unintentionally, so that\n> we use different test files, which then of course results in different\n> diffs.  Is that the case?\n>\n> Anyway, if I run the following two commands:\n>\n> $ git config diff.natvis.xfuncname \"^[\\t ]*<Type[\\t ]+Name=\\\"([^\\\"]+)\\\".*$\"\n> $ echo '*.natvis diff=natvis' >.gitattributes\n>\n> ... then I get this, both on Linux (git version 2.11.1) and on Windows\n> (git version 2.11.1.windows.1):\n>\n> diff --git a/a.natvis b/a.natvis\n> index 7f9bdf5..bc3c090 100644\n> --- a/a.natvis\n> +++ b/a.natvis\n> @@ -19,7 +19,7 @@ test\n>\n>\n>        <!-- Non-blank line -->\n> -      <Item Name=\"added var\">added_var</Item>\n> +      <Item Name=\"added var\">added_vars</Item>\n>\n>\n>        <Item Name=\"var2\">var2</Item>\n>\n>> Just to be sure, I tested your regex and again it didn't work.\n>\n> At this point I'm out of ideas, sorry. :(  The only way I was able to\n> break it was due to mistyping the extension as \"netvis\" several times\n> for some reason.\n>\n> René\n"},{"id":"311084","messageId":"CAKepmagpq-40JVOSHb=a51CjQtM=iCzd1D3KAH3q0gV9NuJMfA@mail.gmail.com","threadId":"45073","inReplyTo":"1aa20b4e-782f-a650-eab8-51218b838337@web.de","subject":"Re: Trying to use xfuncname without success.","fromName":"Jack Adrian Zappa","fromEmail":"adrianh.bsc@gmail.com","sentAt":"2017-02-08T20:39:14Z","receivedAt":"2017-02-08T20:39:34Z","isPatch":false,"sender":{"key":"adrianh.bsc@gmail.com","avatar":null},"body":"> I'm not so sure about that.  With your example I get this diff without\nsetting diff.natvis.xfuncname:\n\nSo, to make sure we are on the same page, I removed the\ndiff.natvis.xfuncname from the .gitconfig and .git/config.  My output\nwas:\n\nC:\\Users\\adrianh\\Documents\\tmp>git diff\ndiff --git a/test.natvis b/test.natvis\nindex 93fd5b4..351301f 100644\n--- a/test.natvis\n+++ b/test.natvis\n@@ -18,6 +18,7 @@\n\n\n          <!-- test text -->\n+         <Item Name=\"added var\">added_var</Item>\n\n\n       <Item Name=\"var2\">var2</Item>\n\nSo I didn't get the default output that your specified.\n\nI've been modifying the .gitconfig file directly, but I tried your command:\n\ngit config diff.natvis.xfuncname \"^[\\t ]*<Type[\\t ]+Name=\\\"([^\\\"]+)\\\".*$\"\n\nand still had the same results.  I.e. NOTHING. :(\n\nOn Wed, Feb 8, 2017 at 1:37 PM, René Scharfe <l.s.r@web.de> wrote:\n> Am 08.02.2017 um 18:11 schrieb Jack Adrian Zappa:\n>> Thanks Rene, but you seem to have missed the point.  NOTHING is\n>> working.  No matter what I put there, it doesn't seem to get matched.\n>\n> I'm not so sure about that.  With your example I get this diff without\n> setting diff.natvis.xfuncname:\n>\n> diff --git a/a.natvis b/a.natvis\n> index 7f9bdf5..bc3c090 100644\n> --- a/a.natvis\n> +++ b/a.natvis\n> @@ -19,7 +19,7 @@ xmlns=\"http://schemas.microsoft.com/vstudio/debugger/natvis/2010\">\n>\n>\n>        <!-- Non-blank line -->\n> -      <Item Name=\"added var\">added_var</Item>\n> +      <Item Name=\"added var\">added_vars</Item>\n>\n>\n>        <Item Name=\"var2\">var2</Item>\n>\n> Note the XML namespace in the hunk header.  It's put there by the\n> default rule because \"xmlns\" starts at the beginning of the line.  Your\n> diff has nothing there, which means the default rule is not used, i.e.\n> your user-defined rule is in effect.\n>\n> Come to think of it, this line break in the middle of the AutoVisualizer\n> tab might have been added by your email client unintentionally, so that\n> we use different test files, which then of course results in different\n> diffs.  Is that the case?\n>\n> Anyway, if I run the following two commands:\n>\n> $ git config diff.natvis.xfuncname \"^[\\t ]*<Type[\\t ]+Name=\\\"([^\\\"]+)\\\".*$\"\n> $ echo '*.natvis diff=natvis' >.gitattributes\n>\n> ... then I get this, both on Linux (git version 2.11.1) and on Windows\n> (git version 2.11.1.windows.1):\n>\n> diff --git a/a.natvis b/a.natvis\n> index 7f9bdf5..bc3c090 100644\n> --- a/a.natvis\n> +++ b/a.natvis\n> @@ -19,7 +19,7 @@ test\n>\n>\n>        <!-- Non-blank line -->\n> -      <Item Name=\"added var\">added_var</Item>\n> +      <Item Name=\"added var\">added_vars</Item>\n>\n>\n>        <Item Name=\"var2\">var2</Item>\n>\n>> Just to be sure, I tested your regex and again it didn't work.\n>\n> At this point I'm out of ideas, sorry. :(  The only way I was able to\n> break it was due to mistyping the extension as \"netvis\" several times\n> for some reason.\n>\n> René\n"},{"id":"311085","messageId":"CAKepmagwMeky4jPZ-YFgPsZSsyOZZQ-kJSWV8QGg4cUNu-ZS8Q@mail.gmail.com","threadId":"45073","inReplyTo":"CAJZjrdXjnDMi8gMY6f_UDbMZrZJ=AoPM+g01hqPCO2pB9csoOw@mail.gmail.com","subject":"Re: Trying to use xfuncname without success.","fromName":"Jack Adrian Zappa","fromEmail":"adrianh.bsc@gmail.com","sentAt":"2017-02-08T20:42:26Z","receivedAt":"2017-02-08T20:42:43Z","isPatch":false,"sender":{"key":"adrianh.bsc@gmail.com","avatar":null},"body":"Thanks Samuel,\n\nSo, the question is, what is causing this problem on my system?\n\nAnyone have an idea to help diagnose this problem?\n\nOn Wed, Feb 8, 2017 at 3:24 PM, Samuel Lijin <sxlijin@gmail.com> wrote:\n> On Windows 7, it works for me in both CMD and Git Bash:\n>\n> $ git --version\n> git version 2.11.0.windows.3\n>\n> $ git diff HEAD^ --word-diff\n> diff --git a/test.natvis b/test.natvis\n> index 93396ad..1233b8c 100644\n> --- a/test.natvis\n> +++ b/test.natvis\n> @@ -18,6 +18,7 @@ test\n>\n>\n>       <!-- Non-blank line -->\n>       {+<Item Name=\"added var\">added_var</Item>+}\n>\n>\n>       <Item Name=\"var2\">var2</Item>\n>\n> On Wed, Feb 8, 2017 at 12:37 PM, René Scharfe <l.s.r@web.de> wrote:\n>> Am 08.02.2017 um 18:11 schrieb Jack Adrian Zappa:\n>>> Thanks Rene, but you seem to have missed the point.  NOTHING is\n>>> working.  No matter what I put there, it doesn't seem to get matched.\n>>\n>> I'm not so sure about that.  With your example I get this diff without\n>> setting diff.natvis.xfuncname:\n>>\n>> diff --git a/a.natvis b/a.natvis\n>> index 7f9bdf5..bc3c090 100644\n>> --- a/a.natvis\n>> +++ b/a.natvis\n>> @@ -19,7 +19,7 @@ xmlns=\"http://schemas.microsoft.com/vstudio/debugger/natvis/2010\">\n>>\n>>\n>>        <!-- Non-blank line -->\n>> -      <Item Name=\"added var\">added_var</Item>\n>> +      <Item Name=\"added var\">added_vars</Item>\n>>\n>>\n>>        <Item Name=\"var2\">var2</Item>\n>>\n>> Note the XML namespace in the hunk header.  It's put there by the\n>> default rule because \"xmlns\" starts at the beginning of the line.  Your\n>> diff has nothing there, which means the default rule is not used, i.e.\n>> your user-defined rule is in effect.\n>>\n>> Come to think of it, this line break in the middle of the AutoVisualizer\n>> tab might have been added by your email client unintentionally, so that\n>> we use different test files, which then of course results in different\n>> diffs.  Is that the case?\n>>\n>> Anyway, if I run the following two commands:\n>>\n>> $ git config diff.natvis.xfuncname \"^[\\t ]*<Type[\\t ]+Name=\\\"([^\\\"]+)\\\".*$\"\n>> $ echo '*.natvis diff=natvis' >.gitattributes\n>>\n>> ... then I get this, both on Linux (git version 2.11.1) and on Windows\n>> (git version 2.11.1.windows.1):\n>>\n>> diff --git a/a.natvis b/a.natvis\n>> index 7f9bdf5..bc3c090 100644\n>> --- a/a.natvis\n>> +++ b/a.natvis\n>> @@ -19,7 +19,7 @@ test\n>>\n>>\n>>        <!-- Non-blank line -->\n>> -      <Item Name=\"added var\">added_var</Item>\n>> +      <Item Name=\"added var\">added_vars</Item>\n>>\n>>\n>>        <Item Name=\"var2\">var2</Item>\n>>\n>>> Just to be sure, I tested your regex and again it didn't work.\n>>\n>> At this point I'm out of ideas, sorry. :(  The only way I was able to\n>> break it was due to mistyping the extension as \"netvis\" several times\n>> for some reason.\n>>\n>> René\n"},{"id":"311086","messageId":"CAJZjrdWouNaNKU2sX89Xh=QqSbdB7srwgufuquYL_1B7H324Yw@mail.gmail.com","threadId":"45073","inReplyTo":"CAKepmagwMeky4jPZ-YFgPsZSsyOZZQ-kJSWV8QGg4cUNu-ZS8Q@mail.gmail.com","subject":"Re: Trying to use xfuncname without success.","fromName":"Samuel Lijin","fromEmail":"sxlijin@gmail.com","sentAt":"2017-02-08T20:46:30Z","receivedAt":"2017-02-08T20:48:25Z","isPatch":false,"sender":{"key":"sxlijin@gmail.com","avatar":"https://gravatar.com/avatar/01777bf1eae64e2b4dca97dcac182a6abbcf6fd8cb4d5b8fa33edf9f8cc21746?d=mp&s=160"},"body":"I just put this togther: https://github.com/sxlijin/xfuncname-test\n\nTry cloning and then for any of config1 thru 3,\n\n$ cp configX .git/config\n$ git diff HEAD^ -- test.natvis\n\nOn Wed, Feb 8, 2017 at 2:42 PM, Jack Adrian Zappa <adrianh.bsc@gmail.com> wrote:\n> Thanks Samuel,\n>\n> So, the question is, what is causing this problem on my system?\n>\n> Anyone have an idea to help diagnose this problem?\n>\n> On Wed, Feb 8, 2017 at 3:24 PM, Samuel Lijin <sxlijin@gmail.com> wrote:\n>> On Windows 7, it works for me in both CMD and Git Bash:\n>>\n>> $ git --version\n>> git version 2.11.0.windows.3\n>>\n>> $ git diff HEAD^ --word-diff\n>> diff --git a/test.natvis b/test.natvis\n>> index 93396ad..1233b8c 100644\n>> --- a/test.natvis\n>> +++ b/test.natvis\n>> @@ -18,6 +18,7 @@ test\n>>\n>>\n>>       <!-- Non-blank line -->\n>>       {+<Item Name=\"added var\">added_var</Item>+}\n>>\n>>\n>>       <Item Name=\"var2\">var2</Item>\n>>\n>> On Wed, Feb 8, 2017 at 12:37 PM, René Scharfe <l.s.r@web.de> wrote:\n>>> Am 08.02.2017 um 18:11 schrieb Jack Adrian Zappa:\n>>>> Thanks Rene, but you seem to have missed the point.  NOTHING is\n>>>> working.  No matter what I put there, it doesn't seem to get matched.\n>>>\n>>> I'm not so sure about that.  With your example I get this diff without\n>>> setting diff.natvis.xfuncname:\n>>>\n>>> diff --git a/a.natvis b/a.natvis\n>>> index 7f9bdf5..bc3c090 100644\n>>> --- a/a.natvis\n>>> +++ b/a.natvis\n>>> @@ -19,7 +19,7 @@ xmlns=\"http://schemas.microsoft.com/vstudio/debugger/natvis/2010\">\n>>>\n>>>\n>>>        <!-- Non-blank line -->\n>>> -      <Item Name=\"added var\">added_var</Item>\n>>> +      <Item Name=\"added var\">added_vars</Item>\n>>>\n>>>\n>>>        <Item Name=\"var2\">var2</Item>\n>>>\n>>> Note the XML namespace in the hunk header.  It's put there by the\n>>> default rule because \"xmlns\" starts at the beginning of the line.  Your\n>>> diff has nothing there, which means the default rule is not used, i.e.\n>>> your user-defined rule is in effect.\n>>>\n>>> Come to think of it, this line break in the middle of the AutoVisualizer\n>>> tab might have been added by your email client unintentionally, so that\n>>> we use different test files, which then of course results in different\n>>> diffs.  Is that the case?\n>>>\n>>> Anyway, if I run the following two commands:\n>>>\n>>> $ git config diff.natvis.xfuncname \"^[\\t ]*<Type[\\t ]+Name=\\\"([^\\\"]+)\\\".*$\"\n>>> $ echo '*.natvis diff=natvis' >.gitattributes\n>>>\n>>> ... then I get this, both on Linux (git version 2.11.1) and on Windows\n>>> (git version 2.11.1.windows.1):\n>>>\n>>> diff --git a/a.natvis b/a.natvis\n>>> index 7f9bdf5..bc3c090 100644\n>>> --- a/a.natvis\n>>> +++ b/a.natvis\n>>> @@ -19,7 +19,7 @@ test\n>>>\n>>>\n>>>        <!-- Non-blank line -->\n>>> -      <Item Name=\"added var\">added_var</Item>\n>>> +      <Item Name=\"added var\">added_vars</Item>\n>>>\n>>>\n>>>        <Item Name=\"var2\">var2</Item>\n>>>\n>>>> Just to be sure, I tested your regex and again it didn't work.\n>>>\n>>> At this point I'm out of ideas, sorry. :(  The only way I was able to\n>>> break it was due to mistyping the extension as \"netvis\" several times\n>>> for some reason.\n>>>\n>>> René\n"},{"id":"311101","messageId":"CAKepmahgo2mbzc1Ws6vi6kRzqsD=UWcOGi0w+dz3FbgafEBmFw@mail.gmail.com","threadId":"45073","inReplyTo":"CAJZjrdWouNaNKU2sX89Xh=QqSbdB7srwgufuquYL_1B7H324Yw@mail.gmail.com","subject":"Re: Trying to use xfuncname without success.","fromName":"Jack Adrian Zappa","fromEmail":"adrianh.bsc@gmail.com","sentAt":"2017-02-08T21:03:55Z","receivedAt":"2017-02-08T21:04:39Z","isPatch":false,"sender":{"key":"adrianh.bsc@gmail.com","avatar":null},"body":"Thanks Samuel,\n\nThat example showed that there must be something wrong in my .git\ndirectory, because with it, I'm getting the correct output.  Moving\nthe same lines to my .git/config didn't work.\n\nOn Wed, Feb 8, 2017 at 3:46 PM, Samuel Lijin <sxlijin@gmail.com> wrote:\n> I just put this togther: https://github.com/sxlijin/xfuncname-test\n>\n> Try cloning and then for any of config1 thru 3,\n>\n> $ cp configX .git/config\n> $ git diff HEAD^ -- test.natvis\n>\n> On Wed, Feb 8, 2017 at 2:42 PM, Jack Adrian Zappa <adrianh.bsc@gmail.com> wrote:\n>> Thanks Samuel,\n>>\n>> So, the question is, what is causing this problem on my system?\n>>\n>> Anyone have an idea to help diagnose this problem?\n>>\n>> On Wed, Feb 8, 2017 at 3:24 PM, Samuel Lijin <sxlijin@gmail.com> wrote:\n>>> On Windows 7, it works for me in both CMD and Git Bash:\n>>>\n>>> $ git --version\n>>> git version 2.11.0.windows.3\n>>>\n>>> $ git diff HEAD^ --word-diff\n>>> diff --git a/test.natvis b/test.natvis\n>>> index 93396ad..1233b8c 100644\n>>> --- a/test.natvis\n>>> +++ b/test.natvis\n>>> @@ -18,6 +18,7 @@ test\n>>>\n>>>\n>>>       <!-- Non-blank line -->\n>>>       {+<Item Name=\"added var\">added_var</Item>+}\n>>>\n>>>\n>>>       <Item Name=\"var2\">var2</Item>\n>>>\n>>> On Wed, Feb 8, 2017 at 12:37 PM, René Scharfe <l.s.r@web.de> wrote:\n>>>> Am 08.02.2017 um 18:11 schrieb Jack Adrian Zappa:\n>>>>> Thanks Rene, but you seem to have missed the point.  NOTHING is\n>>>>> working.  No matter what I put there, it doesn't seem to get matched.\n>>>>\n>>>> I'm not so sure about that.  With your example I get this diff without\n>>>> setting diff.natvis.xfuncname:\n>>>>\n>>>> diff --git a/a.natvis b/a.natvis\n>>>> index 7f9bdf5..bc3c090 100644\n>>>> --- a/a.natvis\n>>>> +++ b/a.natvis\n>>>> @@ -19,7 +19,7 @@ xmlns=\"http://schemas.microsoft.com/vstudio/debugger/natvis/2010\">\n>>>>\n>>>>\n>>>>        <!-- Non-blank line -->\n>>>> -      <Item Name=\"added var\">added_var</Item>\n>>>> +      <Item Name=\"added var\">added_vars</Item>\n>>>>\n>>>>\n>>>>        <Item Name=\"var2\">var2</Item>\n>>>>\n>>>> Note the XML namespace in the hunk header.  It's put there by the\n>>>> default rule because \"xmlns\" starts at the beginning of the line.  Your\n>>>> diff has nothing there, which means the default rule is not used, i.e.\n>>>> your user-defined rule is in effect.\n>>>>\n>>>> Come to think of it, this line break in the middle of the AutoVisualizer\n>>>> tab might have been added by your email client unintentionally, so that\n>>>> we use different test files, which then of course results in different\n>>>> diffs.  Is that the case?\n>>>>\n>>>> Anyway, if I run the following two commands:\n>>>>\n>>>> $ git config diff.natvis.xfuncname \"^[\\t ]*<Type[\\t ]+Name=\\\"([^\\\"]+)\\\".*$\"\n>>>> $ echo '*.natvis diff=natvis' >.gitattributes\n>>>>\n>>>> ... then I get this, both on Linux (git version 2.11.1) and on Windows\n>>>> (git version 2.11.1.windows.1):\n>>>>\n>>>> diff --git a/a.natvis b/a.natvis\n>>>> index 7f9bdf5..bc3c090 100644\n>>>> --- a/a.natvis\n>>>> +++ b/a.natvis\n>>>> @@ -19,7 +19,7 @@ test\n>>>>\n>>>>\n>>>>        <!-- Non-blank line -->\n>>>> -      <Item Name=\"added var\">added_var</Item>\n>>>> +      <Item Name=\"added var\">added_vars</Item>\n>>>>\n>>>>\n>>>>        <Item Name=\"var2\">var2</Item>\n>>>>\n>>>>> Just to be sure, I tested your regex and again it didn't work.\n>>>>\n>>>> At this point I'm out of ideas, sorry. :(  The only way I was able to\n>>>> break it was due to mistyping the extension as \"netvis\" several times\n>>>> for some reason.\n>>>>\n>>>> René\n"},{"id":"311104","messageId":"CAKepmahcaV1Ro_wObkFxezrZntL6JQ_ft+06_3ZSrxEz-yNjzA@mail.gmail.com","threadId":"45073","inReplyTo":"CAJZjrdUcxe_K91CQXz_TgGHgXMsKaddwG5+JEWJ53pv5_GO1zw@mail.gmail.com","subject":"Re: Trying to use xfuncname without success.","fromName":"Jack Adrian Zappa","fromEmail":"adrianh.bsc@gmail.com","sentAt":"2017-02-08T21:12:49Z","receivedAt":"2017-02-08T21:39:15Z","isPatch":false,"sender":{"key":"adrianh.bsc@gmail.com","avatar":null},"body":"That was it.  I have a .gitattributes file in my home directory.\nAhhh, but it's not in my %userprofile% directory, but in my ~\ndirectory.\n\nA bit confusing having 2 home directories.  I made a link to my\n.gitconfig, but forgot to make a link to my .gitattributes.\n\nThanks.\n\n\nA\n\nOn Wed, Feb 8, 2017 at 4:05 PM, Samuel Lijin <sxlijin@gmail.com> wrote:\n> Double check .gitattributes?\n>\n> On Feb 8, 2017 2:58 PM, \"Jack Adrian Zappa\" <adrianh.bsc@gmail.com> wrote:\n>>\n>> Thanks Samuel,\n>>\n>> That example showed that there must be something wrong in my .git\n>> directory, because with it, I'm getting the correct output.  Moving\n>> the same lines to my .git/config didn't work.\n>>\n>> On Wed, Feb 8, 2017 at 3:46 PM, Samuel Lijin <sxlijin@gmail.com> wrote:\n>> > I just put this togther: https://github.com/sxlijin/xfuncname-test\n>> >\n>> > Try cloning and then for any of config1 thru 3,\n>> >\n>> > $ cp configX .git/config\n>> > $ git diff HEAD^ -- test.natvis\n>> >\n>> > On Wed, Feb 8, 2017 at 2:42 PM, Jack Adrian Zappa\n>> > <adrianh.bsc@gmail.com> wrote:\n>> >> Thanks Samuel,\n>> >>\n>> >> So, the question is, what is causing this problem on my system?\n>> >>\n>> >> Anyone have an idea to help diagnose this problem?\n>> >>\n>> >> On Wed, Feb 8, 2017 at 3:24 PM, Samuel Lijin <sxlijin@gmail.com> wrote:\n>> >>> On Windows 7, it works for me in both CMD and Git Bash:\n>> >>>\n>> >>> $ git --version\n>> >>> git version 2.11.0.windows.3\n>> >>>\n>> >>> $ git diff HEAD^ --word-diff\n>> >>> diff --git a/test.natvis b/test.natvis\n>> >>> index 93396ad..1233b8c 100644\n>> >>> --- a/test.natvis\n>> >>> +++ b/test.natvis\n>> >>> @@ -18,6 +18,7 @@ test\n>> >>>\n>> >>>\n>> >>>       <!-- Non-blank line -->\n>> >>>       {+<Item Name=\"added var\">added_var</Item>+}\n>> >>>\n>> >>>\n>> >>>       <Item Name=\"var2\">var2</Item>\n>> >>>\n>> >>> On Wed, Feb 8, 2017 at 12:37 PM, René Scharfe <l.s.r@web.de> wrote:\n>> >>>> Am 08.02.2017 um 18:11 schrieb Jack Adrian Zappa:\n>> >>>>> Thanks Rene, but you seem to have missed the point.  NOTHING is\n>> >>>>> working.  No matter what I put there, it doesn't seem to get\n>> >>>>> matched.\n>> >>>>\n>> >>>> I'm not so sure about that.  With your example I get this diff\n>> >>>> without\n>> >>>> setting diff.natvis.xfuncname:\n>> >>>>\n>> >>>> diff --git a/a.natvis b/a.natvis\n>> >>>> index 7f9bdf5..bc3c090 100644\n>> >>>> --- a/a.natvis\n>> >>>> +++ b/a.natvis\n>> >>>> @@ -19,7 +19,7 @@\n>> >>>> xmlns=\"http://schemas.microsoft.com/vstudio/debugger/natvis/2010\">\n>> >>>>\n>> >>>>\n>> >>>>        <!-- Non-blank line -->\n>> >>>> -      <Item Name=\"added var\">added_var</Item>\n>> >>>> +      <Item Name=\"added var\">added_vars</Item>\n>> >>>>\n>> >>>>\n>> >>>>        <Item Name=\"var2\">var2</Item>\n>> >>>>\n>> >>>> Note the XML namespace in the hunk header.  It's put there by the\n>> >>>> default rule because \"xmlns\" starts at the beginning of the line.\n>> >>>> Your\n>> >>>> diff has nothing there, which means the default rule is not used,\n>> >>>> i.e.\n>> >>>> your user-defined rule is in effect.\n>> >>>>\n>> >>>> Come to think of it, this line break in the middle of the\n>> >>>> AutoVisualizer\n>> >>>> tab might have been added by your email client unintentionally, so\n>> >>>> that\n>> >>>> we use different test files, which then of course results in\n>> >>>> different\n>> >>>> diffs.  Is that the case?\n>> >>>>\n>> >>>> Anyway, if I run the following two commands:\n>> >>>>\n>> >>>> $ git config diff.natvis.xfuncname \"^[\\t ]*<Type[\\t\n>> >>>> ]+Name=\\\"([^\\\"]+)\\\".*$\"\n>> >>>> $ echo '*.natvis diff=natvis' >.gitattributes\n>> >>>>\n>> >>>> ... then I get this, both on Linux (git version 2.11.1) and on\n>> >>>> Windows\n>> >>>> (git version 2.11.1.windows.1):\n>> >>>>\n>> >>>> diff --git a/a.natvis b/a.natvis\n>> >>>> index 7f9bdf5..bc3c090 100644\n>> >>>> --- a/a.natvis\n>> >>>> +++ b/a.natvis\n>> >>>> @@ -19,7 +19,7 @@ test\n>> >>>>\n>> >>>>\n>> >>>>        <!-- Non-blank line -->\n>> >>>> -      <Item Name=\"added var\">added_var</Item>\n>> >>>> +      <Item Name=\"added var\">added_vars</Item>\n>> >>>>\n>> >>>>\n>> >>>>        <Item Name=\"var2\">var2</Item>\n>> >>>>\n>> >>>>> Just to be sure, I tested your regex and again it didn't work.\n>> >>>>\n>> >>>> At this point I'm out of ideas, sorry. :(  The only way I was able to\n>> >>>> break it was due to mistyping the extension as \"netvis\" several times\n>> >>>> for some reason.\n>> >>>>\n>> >>>> René\n"},{"id":"311123","messageId":"CAKepmaidYd4tMRwSNoTTga8s6ji-pc87fZqtxdeDcDVpFhcPWA@mail.gmail.com","threadId":"45073","inReplyTo":"CAKepmahcaV1Ro_wObkFxezrZntL6JQ_ft+06_3ZSrxEz-yNjzA@mail.gmail.com","subject":"Re: Trying to use xfuncname without success.","fromName":"Jack Adrian Zappa","fromEmail":"adrianh.bsc@gmail.com","sentAt":"2017-02-09T00:00:34Z","receivedAt":"2017-02-09T00:01:46Z","isPatch":false,"sender":{"key":"adrianh.bsc@gmail.com","avatar":null},"body":"Well, it mostly works, but I'm getting some weirdness where it has\ngrabbed a line at 126 and is using that for the hunk header.  Strange\nthing is, I move the file to another repository, commit it, make a\nchange to the fileand do a diff, and it gets the correct hunk header.\n\nI'm at a loss. :(\n\nOn Wed, Feb 8, 2017 at 4:12 PM, Jack Adrian Zappa <adrianh.bsc@gmail.com> wrote:\n> That was it.  I have a .gitattributes file in my home directory.\n> Ahhh, but it's not in my %userprofile% directory, but in my ~\n> directory.\n>\n> A bit confusing having 2 home directories.  I made a link to my\n> .gitconfig, but forgot to make a link to my .gitattributes.\n>\n> Thanks.\n>\n>\n> A\n>\n> On Wed, Feb 8, 2017 at 4:05 PM, Samuel Lijin <sxlijin@gmail.com> wrote:\n>> Double check .gitattributes?\n>>\n>> On Feb 8, 2017 2:58 PM, \"Jack Adrian Zappa\" <adrianh.bsc@gmail.com> wrote:\n>>>\n>>> Thanks Samuel,\n>>>\n>>> That example showed that there must be something wrong in my .git\n>>> directory, because with it, I'm getting the correct output.  Moving\n>>> the same lines to my .git/config didn't work.\n>>>\n>>> On Wed, Feb 8, 2017 at 3:46 PM, Samuel Lijin <sxlijin@gmail.com> wrote:\n>>> > I just put this togther: https://github.com/sxlijin/xfuncname-test\n>>> >\n>>> > Try cloning and then for any of config1 thru 3,\n>>> >\n>>> > $ cp configX .git/config\n>>> > $ git diff HEAD^ -- test.natvis\n>>> >\n>>> > On Wed, Feb 8, 2017 at 2:42 PM, Jack Adrian Zappa\n>>> > <adrianh.bsc@gmail.com> wrote:\n>>> >> Thanks Samuel,\n>>> >>\n>>> >> So, the question is, what is causing this problem on my system?\n>>> >>\n>>> >> Anyone have an idea to help diagnose this problem?\n>>> >>\n>>> >> On Wed, Feb 8, 2017 at 3:24 PM, Samuel Lijin <sxlijin@gmail.com> wrote:\n>>> >>> On Windows 7, it works for me in both CMD and Git Bash:\n>>> >>>\n>>> >>> $ git --version\n>>> >>> git version 2.11.0.windows.3\n>>> >>>\n>>> >>> $ git diff HEAD^ --word-diff\n>>> >>> diff --git a/test.natvis b/test.natvis\n>>> >>> index 93396ad..1233b8c 100644\n>>> >>> --- a/test.natvis\n>>> >>> +++ b/test.natvis\n>>> >>> @@ -18,6 +18,7 @@ test\n>>> >>>\n>>> >>>\n>>> >>>       <!-- Non-blank line -->\n>>> >>>       {+<Item Name=\"added var\">added_var</Item>+}\n>>> >>>\n>>> >>>\n>>> >>>       <Item Name=\"var2\">var2</Item>\n>>> >>>\n>>> >>> On Wed, Feb 8, 2017 at 12:37 PM, René Scharfe <l.s.r@web.de> wrote:\n>>> >>>> Am 08.02.2017 um 18:11 schrieb Jack Adrian Zappa:\n>>> >>>>> Thanks Rene, but you seem to have missed the point.  NOTHING is\n>>> >>>>> working.  No matter what I put there, it doesn't seem to get\n>>> >>>>> matched.\n>>> >>>>\n>>> >>>> I'm not so sure about that.  With your example I get this diff\n>>> >>>> without\n>>> >>>> setting diff.natvis.xfuncname:\n>>> >>>>\n>>> >>>> diff --git a/a.natvis b/a.natvis\n>>> >>>> index 7f9bdf5..bc3c090 100644\n>>> >>>> --- a/a.natvis\n>>> >>>> +++ b/a.natvis\n>>> >>>> @@ -19,7 +19,7 @@\n>>> >>>> xmlns=\"http://schemas.microsoft.com/vstudio/debugger/natvis/2010\">\n>>> >>>>\n>>> >>>>\n>>> >>>>        <!-- Non-blank line -->\n>>> >>>> -      <Item Name=\"added var\">added_var</Item>\n>>> >>>> +      <Item Name=\"added var\">added_vars</Item>\n>>> >>>>\n>>> >>>>\n>>> >>>>        <Item Name=\"var2\">var2</Item>\n>>> >>>>\n>>> >>>> Note the XML namespace in the hunk header.  It's put there by the\n>>> >>>> default rule because \"xmlns\" starts at the beginning of the line.\n>>> >>>> Your\n>>> >>>> diff has nothing there, which means the default rule is not used,\n>>> >>>> i.e.\n>>> >>>> your user-defined rule is in effect.\n>>> >>>>\n>>> >>>> Come to think of it, this line break in the middle of the\n>>> >>>> AutoVisualizer\n>>> >>>> tab might have been added by your email client unintentionally, so\n>>> >>>> that\n>>> >>>> we use different test files, which then of course results in\n>>> >>>> different\n>>> >>>> diffs.  Is that the case?\n>>> >>>>\n>>> >>>> Anyway, if I run the following two commands:\n>>> >>>>\n>>> >>>> $ git config diff.natvis.xfuncname \"^[\\t ]*<Type[\\t\n>>> >>>> ]+Name=\\\"([^\\\"]+)\\\".*$\"\n>>> >>>> $ echo '*.natvis diff=natvis' >.gitattributes\n>>> >>>>\n>>> >>>> ... then I get this, both on Linux (git version 2.11.1) and on\n>>> >>>> Windows\n>>> >>>> (git version 2.11.1.windows.1):\n>>> >>>>\n>>> >>>> diff --git a/a.natvis b/a.natvis\n>>> >>>> index 7f9bdf5..bc3c090 100644\n>>> >>>> --- a/a.natvis\n>>> >>>> +++ b/a.natvis\n>>> >>>> @@ -19,7 +19,7 @@ test\n>>> >>>>\n>>> >>>>\n>>> >>>>        <!-- Non-blank line -->\n>>> >>>> -      <Item Name=\"added var\">added_var</Item>\n>>> >>>> +      <Item Name=\"added var\">added_vars</Item>\n>>> >>>>\n>>> >>>>\n>>> >>>>        <Item Name=\"var2\">var2</Item>\n>>> >>>>\n>>> >>>>> Just to be sure, I tested your regex and again it didn't work.\n>>> >>>>\n>>> >>>> At this point I'm out of ideas, sorry. :(  The only way I was able to\n>>> >>>> break it was due to mistyping the extension as \"netvis\" several times\n>>> >>>> for some reason.\n>>> >>>>\n>>> >>>> René\n"},{"id":"311124","messageId":"CAKepmagSysE_31Y3JJwhOKvD_kGfiyEXikep62g=cn9+=v_fZA@mail.gmail.com","threadId":"45073","inReplyTo":"CAKepmaidYd4tMRwSNoTTga8s6ji-pc87fZqtxdeDcDVpFhcPWA@mail.gmail.com","subject":"Re: Trying to use xfuncname without success.","fromName":"Jack Adrian Zappa","fromEmail":"adrianh.bsc@gmail.com","sentAt":"2017-02-09T00:01:53Z","receivedAt":"2017-02-09T00:02:05Z","isPatch":false,"sender":{"key":"adrianh.bsc@gmail.com","avatar":null},"body":"Tried to copy the .git/config file over to the non-working repository\nand it didn't seem to do anything.  Could the git database be\npartially corrupted?\n\nOn Wed, Feb 8, 2017 at 7:00 PM, Jack Adrian Zappa <adrianh.bsc@gmail.com> wrote:\n> Well, it mostly works, but I'm getting some weirdness where it has\n> grabbed a line at 126 and is using that for the hunk header.  Strange\n> thing is, I move the file to another repository, commit it, make a\n> change to the fileand do a diff, and it gets the correct hunk header.\n>\n> I'm at a loss. :(\n>\n> On Wed, Feb 8, 2017 at 4:12 PM, Jack Adrian Zappa <adrianh.bsc@gmail.com> wrote:\n>> That was it.  I have a .gitattributes file in my home directory.\n>> Ahhh, but it's not in my %userprofile% directory, but in my ~\n>> directory.\n>>\n>> A bit confusing having 2 home directories.  I made a link to my\n>> .gitconfig, but forgot to make a link to my .gitattributes.\n>>\n>> Thanks.\n>>\n>>\n>> A\n>>\n>> On Wed, Feb 8, 2017 at 4:05 PM, Samuel Lijin <sxlijin@gmail.com> wrote:\n>>> Double check .gitattributes?\n>>>\n>>> On Feb 8, 2017 2:58 PM, \"Jack Adrian Zappa\" <adrianh.bsc@gmail.com> wrote:\n>>>>\n>>>> Thanks Samuel,\n>>>>\n>>>> That example showed that there must be something wrong in my .git\n>>>> directory, because with it, I'm getting the correct output.  Moving\n>>>> the same lines to my .git/config didn't work.\n>>>>\n>>>> On Wed, Feb 8, 2017 at 3:46 PM, Samuel Lijin <sxlijin@gmail.com> wrote:\n>>>> > I just put this togther: https://github.com/sxlijin/xfuncname-test\n>>>> >\n>>>> > Try cloning and then for any of config1 thru 3,\n>>>> >\n>>>> > $ cp configX .git/config\n>>>> > $ git diff HEAD^ -- test.natvis\n>>>> >\n>>>> > On Wed, Feb 8, 2017 at 2:42 PM, Jack Adrian Zappa\n>>>> > <adrianh.bsc@gmail.com> wrote:\n>>>> >> Thanks Samuel,\n>>>> >>\n>>>> >> So, the question is, what is causing this problem on my system?\n>>>> >>\n>>>> >> Anyone have an idea to help diagnose this problem?\n>>>> >>\n>>>> >> On Wed, Feb 8, 2017 at 3:24 PM, Samuel Lijin <sxlijin@gmail.com> wrote:\n>>>> >>> On Windows 7, it works for me in both CMD and Git Bash:\n>>>> >>>\n>>>> >>> $ git --version\n>>>> >>> git version 2.11.0.windows.3\n>>>> >>>\n>>>> >>> $ git diff HEAD^ --word-diff\n>>>> >>> diff --git a/test.natvis b/test.natvis\n>>>> >>> index 93396ad..1233b8c 100644\n>>>> >>> --- a/test.natvis\n>>>> >>> +++ b/test.natvis\n>>>> >>> @@ -18,6 +18,7 @@ test\n>>>> >>>\n>>>> >>>\n>>>> >>>       <!-- Non-blank line -->\n>>>> >>>       {+<Item Name=\"added var\">added_var</Item>+}\n>>>> >>>\n>>>> >>>\n>>>> >>>       <Item Name=\"var2\">var2</Item>\n>>>> >>>\n>>>> >>> On Wed, Feb 8, 2017 at 12:37 PM, René Scharfe <l.s.r@web.de> wrote:\n>>>> >>>> Am 08.02.2017 um 18:11 schrieb Jack Adrian Zappa:\n>>>> >>>>> Thanks Rene, but you seem to have missed the point.  NOTHING is\n>>>> >>>>> working.  No matter what I put there, it doesn't seem to get\n>>>> >>>>> matched.\n>>>> >>>>\n>>>> >>>> I'm not so sure about that.  With your example I get this diff\n>>>> >>>> without\n>>>> >>>> setting diff.natvis.xfuncname:\n>>>> >>>>\n>>>> >>>> diff --git a/a.natvis b/a.natvis\n>>>> >>>> index 7f9bdf5..bc3c090 100644\n>>>> >>>> --- a/a.natvis\n>>>> >>>> +++ b/a.natvis\n>>>> >>>> @@ -19,7 +19,7 @@\n>>>> >>>> xmlns=\"http://schemas.microsoft.com/vstudio/debugger/natvis/2010\">\n>>>> >>>>\n>>>> >>>>\n>>>> >>>>        <!-- Non-blank line -->\n>>>> >>>> -      <Item Name=\"added var\">added_var</Item>\n>>>> >>>> +      <Item Name=\"added var\">added_vars</Item>\n>>>> >>>>\n>>>> >>>>\n>>>> >>>>        <Item Name=\"var2\">var2</Item>\n>>>> >>>>\n>>>> >>>> Note the XML namespace in the hunk header.  It's put there by the\n>>>> >>>> default rule because \"xmlns\" starts at the beginning of the line.\n>>>> >>>> Your\n>>>> >>>> diff has nothing there, which means the default rule is not used,\n>>>> >>>> i.e.\n>>>> >>>> your user-defined rule is in effect.\n>>>> >>>>\n>>>> >>>> Come to think of it, this line break in the middle of the\n>>>> >>>> AutoVisualizer\n>>>> >>>> tab might have been added by your email client unintentionally, so\n>>>> >>>> that\n>>>> >>>> we use different test files, which then of course results in\n>>>> >>>> different\n>>>> >>>> diffs.  Is that the case?\n>>>> >>>>\n>>>> >>>> Anyway, if I run the following two commands:\n>>>> >>>>\n>>>> >>>> $ git config diff.natvis.xfuncname \"^[\\t ]*<Type[\\t\n>>>> >>>> ]+Name=\\\"([^\\\"]+)\\\".*$\"\n>>>> >>>> $ echo '*.natvis diff=natvis' >.gitattributes\n>>>> >>>>\n>>>> >>>> ... then I get this, both on Linux (git version 2.11.1) and on\n>>>> >>>> Windows\n>>>> >>>> (git version 2.11.1.windows.1):\n>>>> >>>>\n>>>> >>>> diff --git a/a.natvis b/a.natvis\n>>>> >>>> index 7f9bdf5..bc3c090 100644\n>>>> >>>> --- a/a.natvis\n>>>> >>>> +++ b/a.natvis\n>>>> >>>> @@ -19,7 +19,7 @@ test\n>>>> >>>>\n>>>> >>>>\n>>>> >>>>        <!-- Non-blank line -->\n>>>> >>>> -      <Item Name=\"added var\">added_var</Item>\n>>>> >>>> +      <Item Name=\"added var\">added_vars</Item>\n>>>> >>>>\n>>>> >>>>\n>>>> >>>>        <Item Name=\"var2\">var2</Item>\n>>>> >>>>\n>>>> >>>>> Just to be sure, I tested your regex and again it didn't work.\n>>>> >>>>\n>>>> >>>> At this point I'm out of ideas, sorry. :(  The only way I was able to\n>>>> >>>> break it was due to mistyping the extension as \"netvis\" several times\n>>>> >>>> for some reason.\n>>>> >>>>\n>>>> >>>> René\n"},{"id":"311126","messageId":"CAKepmai0NbQmZ-8KCm71qh4cBd9HOzVD1M87TAMhGPYaH1HsHA@mail.gmail.com","threadId":"45073","inReplyTo":"CAKepmagSysE_31Y3JJwhOKvD_kGfiyEXikep62g=cn9+=v_fZA@mail.gmail.com","subject":"Re: Trying to use xfuncname without success.","fromName":"Jack Adrian Zappa","fromEmail":"adrianh.bsc@gmail.com","sentAt":"2017-02-09T00:10:18Z","receivedAt":"2017-02-09T00:10:30Z","isPatch":false,"sender":{"key":"adrianh.bsc@gmail.com","avatar":null},"body":">  where it has grabbed a line at 126 and is using that for the hunk header.\n\nWhen I say that, I mean that it is using that line for *every* hunk\nheader, for every change, regardless if it has passed a hunk head that\nit should have matched.\n\n\n\n\n\nOn Wed, Feb 8, 2017 at 7:01 PM, Jack Adrian Zappa <adrianh.bsc@gmail.com> wrote:\n> Tried to copy the .git/config file over to the non-working repository\n> and it didn't seem to do anything.  Could the git database be\n> partially corrupted?\n>\n> On Wed, Feb 8, 2017 at 7:00 PM, Jack Adrian Zappa <adrianh.bsc@gmail.com> wrote:\n>> Well, it mostly works, but I'm getting some weirdness where it has\n>> grabbed a line at 126 and is using that for the hunk header.  Strange\n>> thing is, I move the file to another repository, commit it, make a\n>> change to the fileand do a diff, and it gets the correct hunk header.\n>>\n>> I'm at a loss. :(\n>>\n>> On Wed, Feb 8, 2017 at 4:12 PM, Jack Adrian Zappa <adrianh.bsc@gmail.com> wrote:\n>>> That was it.  I have a .gitattributes file in my home directory.\n>>> Ahhh, but it's not in my %userprofile% directory, but in my ~\n>>> directory.\n>>>\n>>> A bit confusing having 2 home directories.  I made a link to my\n>>> .gitconfig, but forgot to make a link to my .gitattributes.\n>>>\n>>> Thanks.\n>>>\n>>>\n>>> A\n>>>\n>>> On Wed, Feb 8, 2017 at 4:05 PM, Samuel Lijin <sxlijin@gmail.com> wrote:\n>>>> Double check .gitattributes?\n>>>>\n>>>> On Feb 8, 2017 2:58 PM, \"Jack Adrian Zappa\" <adrianh.bsc@gmail.com> wrote:\n>>>>>\n>>>>> Thanks Samuel,\n>>>>>\n>>>>> That example showed that there must be something wrong in my .git\n>>>>> directory, because with it, I'm getting the correct output.  Moving\n>>>>> the same lines to my .git/config didn't work.\n>>>>>\n>>>>> On Wed, Feb 8, 2017 at 3:46 PM, Samuel Lijin <sxlijin@gmail.com> wrote:\n>>>>> > I just put this togther: https://github.com/sxlijin/xfuncname-test\n>>>>> >\n>>>>> > Try cloning and then for any of config1 thru 3,\n>>>>> >\n>>>>> > $ cp configX .git/config\n>>>>> > $ git diff HEAD^ -- test.natvis\n>>>>> >\n>>>>> > On Wed, Feb 8, 2017 at 2:42 PM, Jack Adrian Zappa\n>>>>> > <adrianh.bsc@gmail.com> wrote:\n>>>>> >> Thanks Samuel,\n>>>>> >>\n>>>>> >> So, the question is, what is causing this problem on my system?\n>>>>> >>\n>>>>> >> Anyone have an idea to help diagnose this problem?\n>>>>> >>\n>>>>> >> On Wed, Feb 8, 2017 at 3:24 PM, Samuel Lijin <sxlijin@gmail.com> wrote:\n>>>>> >>> On Windows 7, it works for me in both CMD and Git Bash:\n>>>>> >>>\n>>>>> >>> $ git --version\n>>>>> >>> git version 2.11.0.windows.3\n>>>>> >>>\n>>>>> >>> $ git diff HEAD^ --word-diff\n>>>>> >>> diff --git a/test.natvis b/test.natvis\n>>>>> >>> index 93396ad..1233b8c 100644\n>>>>> >>> --- a/test.natvis\n>>>>> >>> +++ b/test.natvis\n>>>>> >>> @@ -18,6 +18,7 @@ test\n>>>>> >>>\n>>>>> >>>\n>>>>> >>>       <!-- Non-blank line -->\n>>>>> >>>       {+<Item Name=\"added var\">added_var</Item>+}\n>>>>> >>>\n>>>>> >>>\n>>>>> >>>       <Item Name=\"var2\">var2</Item>\n>>>>> >>>\n>>>>> >>> On Wed, Feb 8, 2017 at 12:37 PM, René Scharfe <l.s.r@web.de> wrote:\n>>>>> >>>> Am 08.02.2017 um 18:11 schrieb Jack Adrian Zappa:\n>>>>> >>>>> Thanks Rene, but you seem to have missed the point.  NOTHING is\n>>>>> >>>>> working.  No matter what I put there, it doesn't seem to get\n>>>>> >>>>> matched.\n>>>>> >>>>\n>>>>> >>>> I'm not so sure about that.  With your example I get this diff\n>>>>> >>>> without\n>>>>> >>>> setting diff.natvis.xfuncname:\n>>>>> >>>>\n>>>>> >>>> diff --git a/a.natvis b/a.natvis\n>>>>> >>>> index 7f9bdf5..bc3c090 100644\n>>>>> >>>> --- a/a.natvis\n>>>>> >>>> +++ b/a.natvis\n>>>>> >>>> @@ -19,7 +19,7 @@\n>>>>> >>>> xmlns=\"http://schemas.microsoft.com/vstudio/debugger/natvis/2010\">\n>>>>> >>>>\n>>>>> >>>>\n>>>>> >>>>        <!-- Non-blank line -->\n>>>>> >>>> -      <Item Name=\"added var\">added_var</Item>\n>>>>> >>>> +      <Item Name=\"added var\">added_vars</Item>\n>>>>> >>>>\n>>>>> >>>>\n>>>>> >>>>        <Item Name=\"var2\">var2</Item>\n>>>>> >>>>\n>>>>> >>>> Note the XML namespace in the hunk header.  It's put there by the\n>>>>> >>>> default rule because \"xmlns\" starts at the beginning of the line.\n>>>>> >>>> Your\n>>>>> >>>> diff has nothing there, which means the default rule is not used,\n>>>>> >>>> i.e.\n>>>>> >>>> your user-defined rule is in effect.\n>>>>> >>>>\n>>>>> >>>> Come to think of it, this line break in the middle of the\n>>>>> >>>> AutoVisualizer\n>>>>> >>>> tab might have been added by your email client unintentionally, so\n>>>>> >>>> that\n>>>>> >>>> we use different test files, which then of course results in\n>>>>> >>>> different\n>>>>> >>>> diffs.  Is that the case?\n>>>>> >>>>\n>>>>> >>>> Anyway, if I run the following two commands:\n>>>>> >>>>\n>>>>> >>>> $ git config diff.natvis.xfuncname \"^[\\t ]*<Type[\\t\n>>>>> >>>> ]+Name=\\\"([^\\\"]+)\\\".*$\"\n>>>>> >>>> $ echo '*.natvis diff=natvis' >.gitattributes\n>>>>> >>>>\n>>>>> >>>> ... then I get this, both on Linux (git version 2.11.1) and on\n>>>>> >>>> Windows\n>>>>> >>>> (git version 2.11.1.windows.1):\n>>>>> >>>>\n>>>>> >>>> diff --git a/a.natvis b/a.natvis\n>>>>> >>>> index 7f9bdf5..bc3c090 100644\n>>>>> >>>> --- a/a.natvis\n>>>>> >>>> +++ b/a.natvis\n>>>>> >>>> @@ -19,7 +19,7 @@ test\n>>>>> >>>>\n>>>>> >>>>\n>>>>> >>>>        <!-- Non-blank line -->\n>>>>> >>>> -      <Item Name=\"added var\">added_var</Item>\n>>>>> >>>> +      <Item Name=\"added var\">added_vars</Item>\n>>>>> >>>>\n>>>>> >>>>\n>>>>> >>>>        <Item Name=\"var2\">var2</Item>\n>>>>> >>>>\n>>>>> >>>>> Just to be sure, I tested your regex and again it didn't work.\n>>>>> >>>>\n>>>>> >>>> At this point I'm out of ideas, sorry. :(  The only way I was able to\n>>>>> >>>> break it was due to mistyping the extension as \"netvis\" several times\n>>>>> >>>> for some reason.\n>>>>> >>>>\n>>>>> >>>> René\n"},{"id":"311281","messageId":"4ff5b2ac-d752-b7e4-8b32-8a5dd6c5b3bb@web.de","threadId":"45073","inReplyTo":"CAKepmai0NbQmZ-8KCm71qh4cBd9HOzVD1M87TAMhGPYaH1HsHA@mail.gmail.com","subject":"Re: Trying to use xfuncname without success.","fromName":"René Scharfe","fromEmail":"l.s.r@web.de","sentAt":"2017-02-10T17:24:25Z","receivedAt":"2017-02-10T17:59:40Z","isPatch":false,"sender":{"key":"l.s.r@web.de","avatar":"https://avatars.githubusercontent.com/u/26122331?v=4"},"body":"Am 09.02.2017 um 01:10 schrieb Jack Adrian Zappa:\n>>  where it has grabbed a line at 126 and is using that for the hunk header.\n>\n> When I say that, I mean that it is using that line for *every* hunk\n> header, for every change, regardless if it has passed a hunk head that\n> it should have matched.\n\nStrange.  That should only happen if no other function lines are \nrecognized before the changes.  You can check if that's the case using \ngit grep and your xfuncline regex, e.g. like this:\n\n\n   $ git grep -En \"^[\\t ]*<Type[\\t ]+Name=\\\"([^\\\"]+)\\\".*$\" *.natvis\n\nAnd you can check *that* result with regular grep -E or egrep if it \nlooks funny.\n\nRené\n"}]}