-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix auto-update thrash: change root .gitattributes (#129)
- Loading branch information
Showing
3 changed files
with
57 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Treat all files in the Go repo as binary, with no git magic updating | ||
# line endings. This produces predictable results in different environments. | ||
# | ||
# Windows users contributing to Go will need to use a modern version | ||
# of git and editors capable of LF line endings. | ||
# | ||
# Windows .bat files are known to have multiple bugs when run with LF | ||
# endings, and so they are checked in with CRLF endings, with a test | ||
# in test/winbatch.go to catch problems. (See golang.org/issue/37791.) | ||
# | ||
# We'll prevent accidental CRLF line endings from entering the repo | ||
# via the git-codereview gofmt checks and tests. | ||
# | ||
# See golang.org/issue/9281. | ||
|
||
* -text | ||
|
||
# NO MICROSOFT_UPSTREAM: | ||
# The above lines in this file are the entire content of upstream's | ||
# ".gitattributes" file. It's important that the development environment in the | ||
# microsoft/go repo matches upstream's to avoid disrupting work on | ||
# contributions. | ||
# | ||
# The below lines apply autocrlf to a few specific files and folders to make | ||
# them work nicely with dotnet/arcade's auto-update infrastructure. These | ||
# files/folders aren't present in upstream. | ||
# | ||
# "darc update" is the auto-update command for dotnet/arcade, and it updates | ||
# file content in a way that ends up with CRLF on Windows and LF on Linux. This | ||
# can cause thrashing when checked in without autocrlf. We fix this by adding | ||
# normalization that matches the way Arcade expects it to work: | ||
# https://github.com/dotnet/arcade/blob/ec35b4879466a6071c16db8fa3ce5d2dca0dfbe8/.gitattributes | ||
|
||
/eng/common/** text=auto encoding=UTF-8 | ||
/eng/Version.Details.xml text=auto encoding=UTF-8 | ||
/eng/Versions.props text=auto encoding=UTF-8 | ||
/global.json text=auto encoding=UTF-8 | ||
/NuGet.config text=auto encoding=UTF-8 | ||
|
||
/eng/common/**/*.sh text eol=lf | ||
# END NO MICROSOFT_UPSTREAM |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters