{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/react-native/issues/12112","repository_url":"https://api.github.com/repos/facebook/react-native","labels_url":"https://api.github.com/repos/facebook/react-native/issues/12112/labels{/name}","comments_url":"https://api.github.com/repos/facebook/react-native/issues/12112/comments","events_url":"https://api.github.com/repos/facebook/react-native/issues/12112/events","html_url":"https://github.com/facebook/react-native/issues/12112","id":203878863,"number":12112,"title":"react-native-git-upgrade changes nothing","user":{"login":"joIivier","id":6048710,"avatar_url":"https://avatars.githubusercontent.com/u/6048710?v=3","gravatar_id":"","url":"https://api.github.com/users/joIivier","html_url":"https://github.com/joIivier","followers_url":"https://api.github.com/users/joIivier/followers","following_url":"https://api.github.com/users/joIivier/following{/other_user}","gists_url":"https://api.github.com/users/joIivier/gists{/gist_id}","starred_url":"https://api.github.com/users/joIivier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joIivier/subscriptions","organizations_url":"https://api.github.com/users/joIivier/orgs","repos_url":"https://api.github.com/users/joIivier/repos","events_url":"https://api.github.com/users/joIivier/events{/privacy}","received_events_url":"https://api.github.com/users/joIivier/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2017-01-29T16:18:00Z","updated_at":"2017-02-27T02:41:15Z","closed_at":null,"body":"### Description\r\n\r\nI am trying to upgrade from react native 35 to 40. Running 'react-native-git-upgrade' in my project tells me the upgrade has been done but nothing has changed in my repository.\r\n\r\nOutput:\r\n\r\n```\r\n/usr/local/Cellar/node/7.4.0/bin/react-native-git-upgrade \r\ngit-upgrade info Check for updates\r\ngit-upgrade info Using yarn 0.19.1\r\ngit-upgrade info Read package.json files\r\ngit-upgrade info Check declared version\r\ngit-upgrade info Check matching versions\r\ngit-upgrade info Check React peer dependency\r\ngit-upgrade info Check that Git is installed\r\ngit-upgrade info Get information from NPM registry\r\ngit-upgrade info Upgrading to React Native 0.40.0, React ~15.4.0-rc.4\r\ngit-upgrade info Setup temporary working directory\r\ngit-upgrade info Configure Git environment\r\ngit-upgrade info Init Git repository\r\ngit-upgrade info Add all files to commit\r\ngit-upgrade info Commit current project sources\r\ngit-upgrade info Create a tag before updating sources\r\ngit-upgrade info Generate old version template\r\ngit-upgrade info Add updated files to commit\r\ngit-upgrade info Commit old version template\r\ngit-upgrade info Install the new version\r\ngit-upgrade info Generate new version template\r\ngit-upgrade info Add updated files to commit\r\nwarning: CRLF will be replaced by LF in android/gradlew.bat.\r\n\r\n\r\nThe file will have its original line endings in your working directory.\r\ngit-upgrade info Commit new version template\r\ngit-upgrade info Generate the patch between the 2 versions\r\ngit-upgrade info Save the patch in temp directory\r\ngit-upgrade info Reset the 2 temporary commits\r\ngit-upgrade info Apply the patch\r\nerror: patch failed: .flowconfig:1\r\nFalling back to three-way merge...\r\nApplied patch to '.flowconfig' with conflicts.\r\nerror: patch failed: .gitignore:22\r\nFalling back to three-way merge...\r\nApplied patch to '.gitignore' with conflicts.\r\nerror: android/app/src/main/java/com/appname/MainApplication.java: does not exist in index\r\nerror: cannot apply binary patch to 'android/gradle/wrapper/gradle-wrapper.jar' without full index line\r\nFalling back to three-way merge...\r\nerror: cannot apply binary patch to 'android/gradle/wrapper/gradle-wrapper.jar' without full index line\r\nerror: android/gradle/wrapper/gradle-wrapper.jar: patch does not apply\r\nerror: patch failed: ios/appname.xcodeproj/project.pbxproj:22\r\nFalling back to three-way merge...\r\nApplied patch to 'ios/appname.xcodeproj/project.pbxproj' with conflicts.\r\nerror: patch failed: ios/appname.xcodeproj/xcshareddata/xcschemes/appname.xcscheme:3\r\nFalling back to three-way merge...\r\nApplied patch to 'ios/appname.xcodeproj/xcshareddata/xcschemes/appname.xcscheme' cleanly.\r\nerror: ios/appname/AppDelegate.m: does not exist in index\r\nerror: patch failed: ios/appname/Info.plist:45\r\nFalling back to three-way merge...\r\nApplied patch to 'ios/appname/Info.plist' with conflicts.\r\ngit-upgrade WARN The upgrade process succeeded but there might be conflicts to be resolved. See above for the list of files that have merge conflicts.\r\ngit-upgrade info Upgrade done\r\n```\r\nThen I look in my status\r\n```\r\ngit status\r\nOn branch migration-rn40-2\r\nUntracked files:\r\n  (use \"git add <file>...\" to include in what will be committed)\r\n\r\n\t../../../old-logs\r\n\r\nnothing added to commit but untracked files present (use \"git add\" to track)\r\n```\r\nNothing. No conflict.\r\nThis is the ouptut after I ignored *.png in my global gitignore file (as per issue #11402). I had previously also warning related to the png files (although I never changed this part of the project since I'm only doing iOs for now).\r\nAfter this script is run I get react native 40 in my node modules, but I couldn't build the project on Xcode which was complaining about the React native libraries of my project.\r\n\r\n### Solution\r\n\r\nI guess the critical lines in the logs are the \"without full index line\" errors for the binaries I don't have (maybe because I never ran the android project) and the \"does not exist in index\" that is thrown for  AppDelegate.m (I use swift instead).\r\n\r\nI managed to get it to work by changing in cliEntry.js `git apply --3way ${patchPath}` by `git apply --reject ${patchPath}` which worked (I could start correctly my application afterwards) but I will have to merge manually the conflicts now.\r\n\r\nI guess you should at least test the output code of git apply to detect a failure and print a valid error message, and maybe suggest to retry with --reset instead of --3way if the --3way failed.\r\n\r\n### Additional Information\r\n\r\n* React Native version: 35\r\n* Platform: iOs\r\n* Operating System: MacOS\r\n"},"comment":{"url":"https://api.github.com/repos/facebook/react-native/issues/comments/282614473","html_url":"https://github.com/facebook/react-native/issues/12112#issuecomment-282614473","issue_url":"https://api.github.com/repos/facebook/react-native/issues/12112","id":282614473,"user":{"login":"whk1459086640","id":16095030,"avatar_url":"https://avatars.githubusercontent.com/u/16095030?v=3","gravatar_id":"","url":"https://api.github.com/users/whk1459086640","html_url":"https://github.com/whk1459086640","followers_url":"https://api.github.com/users/whk1459086640/followers","following_url":"https://api.github.com/users/whk1459086640/following{/other_user}","gists_url":"https://api.github.com/users/whk1459086640/gists{/gist_id}","starred_url":"https://api.github.com/users/whk1459086640/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whk1459086640/subscriptions","organizations_url":"https://api.github.com/users/whk1459086640/orgs","repos_url":"https://api.github.com/users/whk1459086640/repos","events_url":"https://api.github.com/users/whk1459086640/events{/privacy}","received_events_url":"https://api.github.com/users/whk1459086640/received_events","type":"User","site_admin":false},"created_at":"2017-02-27T02:41:15Z","updated_at":"2017-02-27T02:41:15Z","body":"Why i can‘t find this line"}}
{"actor":{"display_login":"whk1459086640"}}