react-native/react-native-git-upgrade
mikaello 0da9688f41 Forcing git diff to not use colorized output
Summary:
If a user sets `color.ui` or `color.diff` to `always` in their git configuration files, the output of `git diff` will contain some "color characters" as well as the diff. When you try to apply this diff with color characters with `git apply` you will get `fatal: unrecognized input`.

I think this is the cause of issue #11543

Reproduce in git with:
```
mkdir git-test
cd git-test/
git init
echo "foo" > bar.txt
git add bar.txt
git commit -m "First"
echo "foomobile" > bar.txt
git add bar.txt
git diff HEAD > new.patch --color=always
git reset --hard HEAD
git apply new.patch --check
```

Set `--color=never` or `--no-color` and the unrecognized input error should disappear and the patch be applied successfully.
Closes https://github.com/facebook/react-native/pull/12211

Differential Revision: D4514132

fbshipit-source-id: 3622df6ece92794c8a175f0599f5a276d92e82e8
2017-02-05 14:28:40 -08:00
..
README.md Git upgrade: Tweak wording 2016-12-05 06:28:34 -08:00
checks.js Fix the parse error when specifying an unknown version. 2016-12-02 08:28:32 -08:00
cli.js New upgrading process, relying on Git 2016-11-28 08:28:35 -08:00
cliEntry.js Forcing git diff to not use colorized output 2017-02-05 14:28:40 -08:00
index.js Use Yarn if available 2016-12-02 00:13:32 -08:00
package.json Fix react-native-git-upgrade by get package.json instead of selective field 2016-12-09 07:58:34 -08:00
yarn.js Git upgrade: Tweak README, bump version, fix a bug 2016-12-05 05:58:29 -08:00

README.md

React Native Git Upgrade

This tool makes upgrading your apps to a new version of React Native easier than the stock react-native upgrade command.

It uses Git under the hood to automatically resolve merge conflicts in project templates (native iOS and Android files, .flowconfig etc.). These conflicts happen when a new React Native version introduces changes to those files and you have local changes in those files too, which is quite common.

Usage

See the Upgrading docs on the React Native website.

Basic usage:

$ npm install -g react-native-git-upgrade
$ cd MyReactNativeApp
$ react-native-git-upgrade