4

In GitHub's documentation on linguist, the section on using the .gitattributes file says a path can be marked as vendored, and thus ignored in the repository's statistics tracking, with:

special-vendored-path/* linguist-vendored

However, is it possible to have linguist mark directories as vendored that may be nested in directories containing non-vendored code?

I tried adding a line styled as */special-vendored-path/* linguist-vendored to my .gitattributes, but that didn't cause the GitHub code-proportion information to change.

pchaigno
  • 11,313
  • 2
  • 29
  • 54
user2943160
  • 507
  • 5
  • 12

1 Answers1

4

To match a directory inside an arbitrary arborescence of directories, you need double asterisks:

**/special-vendored-path/* linguist-vendored

Note, however, that double asterisks are not needed at the end of paths. For example, test1/* will match test1/test2/test3/file.

pchaigno
  • 11,313
  • 2
  • 29
  • 54