{"action":"created","issue":{"url":"https://api.github.com/repos/ds300/patch-package/issues/60","repository_url":"https://api.github.com/repos/ds300/patch-package","labels_url":"https://api.github.com/repos/ds300/patch-package/issues/60/labels{/name}","comments_url":"https://api.github.com/repos/ds300/patch-package/issues/60/comments","events_url":"https://api.github.com/repos/ds300/patch-package/issues/60/events","html_url":"https://github.com/ds300/patch-package/issues/60","id":332548588,"node_id":"MDU6SXNzdWUzMzI1NDg1ODg=","number":60,"title":"Temporary files (e.g. build products) lead to large diff","user":{"login":"KevinVlaanderen","id":4102287,"node_id":"MDQ6VXNlcjQxMDIyODc=","avatar_url":"https://avatars2.githubusercontent.com/u/4102287?v=4","gravatar_id":"","url":"https://api.github.com/users/KevinVlaanderen","html_url":"https://github.com/KevinVlaanderen","followers_url":"https://api.github.com/users/KevinVlaanderen/followers","following_url":"https://api.github.com/users/KevinVlaanderen/following{/other_user}","gists_url":"https://api.github.com/users/KevinVlaanderen/gists{/gist_id}","starred_url":"https://api.github.com/users/KevinVlaanderen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KevinVlaanderen/subscriptions","organizations_url":"https://api.github.com/users/KevinVlaanderen/orgs","repos_url":"https://api.github.com/users/KevinVlaanderen/repos","events_url":"https://api.github.com/users/KevinVlaanderen/events{/privacy}","received_events_url":"https://api.github.com/users/KevinVlaanderen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-06-14T20:15:40Z","updated_at":"2018-06-14T20:18:02Z","closed_at":null,"author_association":"NONE","body":"We are using patch-package to patch react-native. Unfortunately, compiling react-native results in Android/iOS build files within the node_modules folder. This leads to two problems:\r\n\r\n- If no exclude option is provided, `npx patch-package react-native` results in a huge diff file, because all build files are seen as new and therefore added to the diff.\r\n- When adding the exclude option to ignore all build files, a new process is spawned to git reset each of them. This takes longer than we were willing to wait.\r\n\r\nWhen debugging this, we noticed that the approach to creating a diff contains some inefficiencies:\r\n\r\n- The diff command is ran twice; once to determine files to exclude, and once to obtain the final diff.\r\n- Excluded files are only removed from the set very late (prior to creating the final diff. This means unnecessary copying of files.\r\n- Excluded files are reset one per one. For every excluded file, a new 'git reset' process is spawned. This is very expensive. (see below)\r\n\r\nI am working on a MR."},"comment":{"url":"https://api.github.com/repos/ds300/patch-package/issues/comments/397425012","html_url":"https://github.com/ds300/patch-package/issues/60#issuecomment-397425012","issue_url":"https://api.github.com/repos/ds300/patch-package/issues/60","id":397425012,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NzQyNTAxMg==","user":{"login":"ds300","id":1242537,"node_id":"MDQ6VXNlcjEyNDI1Mzc=","avatar_url":"https://avatars2.githubusercontent.com/u/1242537?v=4","gravatar_id":"","url":"https://api.github.com/users/ds300","html_url":"https://github.com/ds300","followers_url":"https://api.github.com/users/ds300/followers","following_url":"https://api.github.com/users/ds300/following{/other_user}","gists_url":"https://api.github.com/users/ds300/gists{/gist_id}","starred_url":"https://api.github.com/users/ds300/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ds300/subscriptions","organizations_url":"https://api.github.com/users/ds300/orgs","repos_url":"https://api.github.com/users/ds300/repos","events_url":"https://api.github.com/users/ds300/events{/privacy}","received_events_url":"https://api.github.com/users/ds300/received_events","type":"User","site_admin":false},"created_at":"2018-06-14T20:18:01Z","updated_at":"2018-06-14T20:18:01Z","author_association":"OWNER","body":"Awesome! Can't wait to see it! :-)\n\nOn Thu, 14 Jun 2018, 21:15 Kevin Vlaanderen, <notifications@github.com>\nwrote:\n\n> We are using patch-package to patch react-native. Unfortunately, compiling\n> react-native results in Android/iOS build files within the node_modules\n> folder. This leads to two problems:\n>\n>    - If no exclude option is provided, npx patch-package react-native\n>    results in a huge diff file, because all build files are seen as new and\n>    therefore added to the diff.\n>    - When adding the exclude option to ignore all build files, a new\n>    process is spawned to git reset each of them. This takes longer than we\n>    were willing to wait.\n>\n> When debugging this, we noticed that the approach to creating a diff\n> contains some inefficiencies:\n>\n>    - The diff command is ran twice; once to determine files to exclude,\n>    and once to obtain the final diff.\n>    - Excluded files are only removed from the set very late (prior to\n>    creating the final diff. This means unnecessary copying of files.\n>    - Excluded files are reset one per one. For every excluded file, a new\n>    'git reset' process is spawned. This is very expensive. (see below)\n>\n> I am working on a MR.\n>\n> —\n> You are receiving this because you are subscribed to this thread.\n> Reply to this email directly, view it on GitHub\n> <https://github.com/ds300/patch-package/issues/60>, or mute the thread\n> <https://github.com/notifications/unsubscribe-auth/ABL1qW09c6hNMqPZOLMfdSrhNxKQT4MQks5t8sRsgaJpZM4Uol70>\n> .\n>\n"}}
{"actor":{"display_login":"ds300"}}