Skip to content

Commit fb354cb

Browse files
friederbluemlefacebook-github-bot
authored andcommitted
Remove .gitattributes and normalize line endings (#29792)
Summary: The nested `.gitattributes` file in `packages/react-native-codegen/android/` caused some confusion on Linux and macOS, causing Git to show `packages/react-native-codegen/android/gradlew.bat` as modified (CRLF removed, LF added). Instead of relying on repo-local `.gitattributes` files to convert endings in the working directory, the files should be committed to source control with the correct line endings in the first place. There is no reason to convert LF endings in .sh and many other file to CRLF on Windows (maybe this was an issue a long time ago, but unless Notepad is used this won't be a problem for practically all modern editors). Also fixed the line endings of `scripts/launchPackager.bat` which was incorrectly committed as LF. ## Changelog [Internal] [Fixed] - Line endings and .gitattributes Pull Request resolved: #29792 Test Plan: Clone repo on Linux, macOS, and Windows, and make sure no modified files show up. Reviewed By: fkgozali Differential Revision: D23546135 Pulled By: mdvacca fbshipit-source-id: 1572fcb959212f212b137066f1aa66f0bb6e86c3
1 parent 5acf7c9 commit fb354cb

File tree

5 files changed

+12
-30
lines changed

5 files changed

+12
-30
lines changed

.gitattributes

-6
This file was deleted.

packages/react-native-codegen/android/.gitattributes

-6
This file was deleted.

packages/react-native-codegen/android/.gitignore

-5
This file was deleted.

scripts/launchPackager.bat

+12-12
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
:: Copyright (c) Facebook, Inc. and its affiliates.
2-
::
3-
:: This source code is licensed under the MIT license found in the
4-
:: LICENSE file in the root directory of this source tree.
5-
6-
@echo off
7-
title Metro
8-
call .packager.bat
9-
cd ../../../
10-
node "%~dp0..\cli.js" start
11-
pause
12-
exit
1+
:: Copyright (c) Facebook, Inc. and its affiliates.
2+
::
3+
:: This source code is licensed under the MIT license found in the
4+
:: LICENSE file in the root directory of this source tree.
5+
6+
@echo off
7+
title Metro
8+
call .packager.bat
9+
cd ../../../
10+
node "%~dp0..\cli.js" start
11+
pause
12+
exit

template/_gitattributes

-1
This file was deleted.

0 commit comments

Comments
 (0)