Skip to content

Commit

Permalink
Remove .gitattributes and normalize line endings (#29792)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
friederbluemle authored and facebook-github-bot committed Sep 4, 2020
1 parent 5acf7c9 commit fb354cb
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 30 deletions.
6 changes: 0 additions & 6 deletions .gitattributes

This file was deleted.

6 changes: 0 additions & 6 deletions packages/react-native-codegen/android/.gitattributes

This file was deleted.

5 changes: 0 additions & 5 deletions packages/react-native-codegen/android/.gitignore

This file was deleted.

24 changes: 12 additions & 12 deletions scripts/launchPackager.bat
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
:: Copyright (c) Facebook, Inc. and its affiliates.
::
:: This source code is licensed under the MIT license found in the
:: LICENSE file in the root directory of this source tree.

@echo off
title Metro
call .packager.bat
cd ../../../
node "%~dp0..\cli.js" start
pause
exit
:: Copyright (c) Facebook, Inc. and its affiliates.
::
:: This source code is licensed under the MIT license found in the
:: LICENSE file in the root directory of this source tree.

@echo off
title Metro
call .packager.bat
cd ../../../
node "%~dp0..\cli.js" start
pause
exit
1 change: 0 additions & 1 deletion template/_gitattributes

This file was deleted.

0 comments on commit fb354cb

Please sign in to comment.