react-native-community / upgrade-support

A central community-backed place to request and give help when upgrading your app.
MIT License
254 stars 2 forks source link

Dirty git repo after upgrading to 0.62.0 #71

Open stigi opened 4 years ago

stigi commented 4 years ago

Environment

Happens on macOS (Catalina 10.15.4 (19E287)). Didn't confirm on other versions or OSes.

Upgrading version

From 0.61.5 to 0.62.0

Problem

.gitattributes changes will cause the git repo to check out as dirty on a fresh checkout. More details here https://github.com/react-native-community/rn-diff-purge/issues/35

Solution

Ignore the .gitattributes changes, as they are also not part of a vanilla 0.62.0 project.

lucasbento commented 4 years ago

@pvinis: can you check this out?

pvinis commented 4 years ago

Thanks for the report. I'll take a look today. I think I know what the problem is, but I'll confirm and come back.

benjaminpearson commented 4 years ago

We are also experiencing this issue after using https://react-native-community.github.io/upgrade-helper/ Sorry to ask @pvinis but did you have an outcome as to whether it is needed or not?

pvinis commented 3 years ago

Right, it's been a while. Here is the thing:

.gitattributes added a rule for *.bat files to end lines with crlf. In the android folder there is a gradlew file, which is a script that can be ran in macos, and a gradlew.bat file, which is a script that can be ran in windows. Windows needs that file to have line endings crlf to work properly. Macos often likes to change these line endings to just lf.

So:

I hope that makes sense and helps a bit. If not, we can look into it a bit more.