0
0
Fork 0
mirror of https://github.com/netdata/netdata.git synced 2025-04-17 19:22:40 +00:00
netdata_netdata/.gitattributes
Andrew Clayton ffa23129c0 Add a .gitattributes file ()
Currently this just sets the git diff driver for C source code files.

Git can be told to apply language-specific rules when generating diffs.
Enabling this for C source code files (*.c and *.h) means that function
names are printed correctly. Specifically, doing so prevents "git diff"
from mistakenly considering unindented goto labels as function names.

This has the same effect as adding

    [diff "default"]
        xfuncname = "^[[:alpha:]$_].*[^:]$"

to your git config file.

e.g get

    @@ -10,7 +10,7 @@ int main(void)

instead of

    @@ -10,7 +10,7 @@ again:

Signed-off-by: Andrew Clayton <andrew@zeta.digital-domain.net>
2019-07-05 11:54:32 +02:00

2 lines
26 B
Text