Skip to content

Commit

Permalink
.gitattributes: make github index files in 'build' dirs
Browse files Browse the repository at this point in the history
Currently Github would exclude files under 'build' dirs in the repo.
For example, try searching for
`third_party/googleapis/google/devtools/build` would yield no results,
but `third_party/googleapis/google/devtools/cloudbuild/` would works.

Fix this with a custom gitattributes.

Closes #22942.

PiperOrigin-RevId: 649114629
Change-Id: Ia62a447ce390671860c48a20352ac352332b88e3
  • Loading branch information
sluongng authored and copybara-github committed Jul 3, 2024
1 parent 57e4ff5 commit 9fc8948
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
BUILD linguist-language=Python
site/* linguist-documentation

# Github excludes files in 'build' directory from their search by default.
# This negates the exclusion.
#
# For more information, see:
# https://docs.github.com/en/search-github/searching-on-github/finding-files-on-github#customizing-excluded-files
**/build/** linguist-generated=false

# Files that should not use CRLF line endings, even on Windows.
tools/genrule/genrule-setup.sh -text

Expand Down

0 comments on commit 9fc8948

Please sign in to comment.