From a037243ab72120d1486a36f0887e62cfc05cdcb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Reis?= Date: Thu, 26 May 2016 01:07:18 +0100 Subject: [PATCH 1/5] meta: enable git auto end-of-line normalization Git should convert the line endings of text files to CRLF on Windows and only LF on Unix. It should also convert line endings of text files stored in the repository to only LF. --- .gitattributes | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.gitattributes b/.gitattributes index fa5162684b8dc8..5f77cee8af590d 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,2 +1,13 @@ +* text=auto + test/fixtures/* -text -vcbuild.bat text eol=crlf + +# Exceptions for dependencies committed with CRLF line endings +# Should be removed when the files are updated +deps/npm/node_modules/node-gyp/gyp/gyp.bat -text +deps/npm/node_modules/node-gyp/gyp/samples/samples.bat -text +deps/uv/docs/make.bat -text +deps/v8/test/message/regress/regress-73.js -text +deps/zlib/contrib/minizip/ChangeLogUnzip -text +tools/gyp/gyp.bat -text +tools/gyp/samples/samples.bat -text From bed497f9b517b96051290a27d8b20faa73d62fe7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Reis?= Date: Fri, 27 May 2016 14:49:17 +0100 Subject: [PATCH 2/5] tools: do not enforce a linebreak style in linter Linebreak style should be enforced by git in a cross platform way, and not by the linter. Fixes: https://github.com/nodejs/node/issues/6912 --- .eslintrc | 1 - 1 file changed, 1 deletion(-) diff --git a/.eslintrc b/.eslintrc index f9b0ef3b015f77..a55d0f33ef749e 100644 --- a/.eslintrc +++ b/.eslintrc @@ -60,7 +60,6 @@ rules: indent: [2, 2, {SwitchCase: 1}] key-spacing: [2, {mode: "minimum"}] keyword-spacing: 2 - linebreak-style: [2, "unix"] max-len: [2, 80, 2] new-parens: 2 no-mixed-spaces-and-tabs: 2 From be486b851642e7789a6c58d06491ffa661e6f980 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Reis?= Date: Wed, 8 Jun 2016 21:58:50 +0100 Subject: [PATCH 3/5] fixup meta: exclude a v8 test using text=auto this file is handled correctly by git, but with the new configuration it is not. Better add an exception in both cases just in case. --- .gitattributes | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitattributes b/.gitattributes index 5f77cee8af590d..af5aa0f1cbb373 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,4 +1,5 @@ * text=auto +deps/v8/test/mjsunit/regress/regress-2825.js -text test/fixtures/* -text From 86bd27aa3e6ce94de44171a3b6a64c879836cf32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Reis?= Date: Tue, 7 Jun 2016 10:18:56 +0100 Subject: [PATCH 4/5] fixup tools: linebreak-style: 0 --- .eslintrc | 1 + 1 file changed, 1 insertion(+) diff --git a/.eslintrc b/.eslintrc index a55d0f33ef749e..5a2f406a6270c2 100644 --- a/.eslintrc +++ b/.eslintrc @@ -60,6 +60,7 @@ rules: indent: [2, 2, {SwitchCase: 1}] key-spacing: [2, {mode: "minimum"}] keyword-spacing: 2 + linebreak-style: 0 max-len: [2, 80, 2] new-parens: 2 no-mixed-spaces-and-tabs: 2 From a4298de65485e287ea478aa0f950ea43a0f6f74e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Reis?= Date: Tue, 7 Jun 2016 11:39:44 +0100 Subject: [PATCH 5/5] fixup meta: enable text only for selected extensions --- .gitattributes | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/.gitattributes b/.gitattributes index af5aa0f1cbb373..9c1c9c4d692440 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,4 +1,35 @@ -* text=auto +* -text +./* text=auto +*.bat text +*.c text +*.cc text +*.css text +*.d text +*.def text +*.gyp text +*.gypi text +*.h text +*.html text +*.inc text +*.js text +*.json text +*.man text +*.manifest text +*.md text +*.out text +*.pl text +*.py text +*.rb text +*.rc text +*.sln text +*.status text +*.txt text +*.vcxproj text +*.wixproj text +*.wxl text +*.wxs text +*.yml text +tools/msvs/npm/npmrc text deps/v8/test/mjsunit/regress/regress-2825.js -text test/fixtures/* -text