From 787e7b048cff392d1cb68c57c99ff71602997475 Mon Sep 17 00:00:00 2001 From: Giovanni Bajo Date: Sun, 22 Mar 2020 09:28:21 +0100 Subject: build: force all Windows batch files to CRLF Batch files should use CRLF endings. LF endings mostly work but in some situations they cause random errors like goto commands failing for mysterious reasons. See golang.org/issue/37791 for more information. Next CL triggered one of such bug (a label was not being recognized), so prepare for it by converting to CRLF. This CL also touches all existing batch files to force git to update the line endings (unfortunately, changing .gitattributes only has effect next time the file is checked out or modified). Fixes #37791 Updates #9281 Change-Id: I6f9a114351cb7ac9881914400aa210c930eb8cc1 Reviewed-on: https://go-review.googlesource.com/c/go/+/96495 Run-TryBot: Giovanni Bajo Reviewed-by: Ian Lance Taylor Reviewed-by: Alex Brainman --- .gitattributes | 6 ++++++ 1 file changed, 6 insertions(+) (limited to '.gitattributes') diff --git a/.gitattributes b/.gitattributes index 07953cae39..bcea0290f4 100644 --- a/.gitattributes +++ b/.gitattributes @@ -8,3 +8,9 @@ # See golang.org/issue/9281 * -text + +# The only exception is Windows files that must absolutely be CRLF or +# might not work. Batch files are known to have multiple bugs when run +# with LF endings. See golang.org/issue/37791 for more information. + +*.bat text eol=crlf -- cgit v1.2.3-54-g00ecf