From: Jack Adrian Zappa Date: Tue, 07 Feb 2017 19:21:13 GMT Subject: Trying to use xfuncname without success. Message-ID: I'm trying to specify a hunk header using xfuncname, and it just doesn't want to work. The full question is on SO here: http://stackoverflow.com/questions/42078376/why-isnt-my-xfuncname-working-in-my-gitconfig-file But the basic gist is that no matter what regex I specify, git will not recognise the hunk header. Am I doing something wrong or is this a bug? For those who don't want to jump to the SO site, I've copied the text below: -----8<--------8<--------8<--------8<--------8<--------8<--------8<--------8<--- I'm trying to setup a hunk header for .natvis files. For some reason, it doesn't seem to be working. I'm following their instructions from here, which doesn't say much in terms of restrictions of the regex, such as, is the matched item considered the hunk header or do I need a group? I have tried both with no success. This is what I have: [diff "natvis"] xfuncname = "^[\\\t ]* var added_var var2 with the added_var being the new line added. I'm really not sure why this is so difficult. EDIT: Here is a sample output of what I am getting: $ git diff --word-diff diff --git a/test.natvis b/test.natvis index 73c06bc..bc0f549 100644 --- a/test.natvis +++ b/test.natvis @@ -18,6 +18,7 @@ {+added_var+} var2 warning: LF will be replaced by CRLF in test.natvis. The file will have its original line endings in your working directory. Even using xfuncname = "^.*$" I would have expected that would have shown up as my hunk header, but I get nothing. :( EDIT: I've tried the solution proposed by torek, but to no avail. It's like it doesn't know what to do with the xfuncname entry. :(