Skip to content

Conversation

@dchristiaens
Copy link
Member

Adds a .gitattributes file to set git diff attributes for the most common file types in the repo. This allows to specify the programming language where Linguist doesn't detect it correctly (that 0.2% C, for instance), and also to exclude the SVG icons and the atlas parcellation files from the git stats.

We may want to discuss if we want to count the user documentation as part of the code base or not. Currently, they show up in the stats and account for a fair number of line changes because of their verbosity. If we want to, we should be able to suppress them by adding a -diff flag in the .gitattributes file.

@dchristiaens dchristiaens requested review from Lestropie and removed request for jdtournier May 20, 2020 08:03
Copy link
Member

@Lestropie Lestropie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is the right balance.

For future reference: while the contents of this file can influence the outcomes of git statistics depending on the method used, it does not influence GitHub's reported statistics. The focus of this PR is rather on correct identification of the languages of various files: for collecting statistics on such, and for ensuring that file content differences are displayed as desired.

@jdtournier jdtournier merged commit 86fd1b7 into master May 22, 2020
@jdtournier jdtournier deleted the gitattr branch May 22, 2020 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants