Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upCommand to reset non-patched chromium files #5758
Open
+136
−17
Conversation
Shows a diff of each modified chromium file and asks if the user wants to reset that file. This makes sure only files that are modified are reset, if desired, and also gives an opportunity for the developer to not lose work unintentionally. This fixes a couple of different scenarios: 1. Developer wants to reset all chromium files to the current brave-core patched state. Right now, they could run `git reset --hard` in `src` directory (or run `npm run init` which will run that same git reset command), but that will result in a very long subsequent build time. Running both `npm run sync` and this new command, `npm run reset_non_patched`, will make sure only files that are patched by brave-core, and files that were otherwise modified are reset, but not the entire chromium repository. 2. A scenario whereby a developer can be editing chromium files in an attempt to debug an issue or create a feature, but doesn't know exactly which changes they wish to keep. Instead of running `npm run update_patches` and having to decide which patches to keep and dismiss and then resetting the other changes manually, this command will allow them to make the decision about which changes to keep or discard first, before committing to create patches.
80f29ff
to
162d823
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
petemill commentedAug 22, 2019
Shows a diff of each modified chromium file and asks if the user wants to reset that file. This makes sure only files that are modified are reset, if desired, and also gives an opportunity for the developer to not lose work unintentionally.
The main scenario this fixes and that I have used this command for:
git reset --hardinsrcdirectory (or runnpm run initwhich will run that same git reset command), but that will result in a very long subsequent build time. Now, they can run bothnpm run syncand this new command,npm run reset_non_patched, will make sure only the few user-local-modified files (either that are patched by brave-core or others) are reset, and not the entire chromium repository.Another scenario this fixes, though not perfectly:
npm run update_patchesand having to decide which patches to keep and dismiss and then resetting the other changes manually, this command will allow them to make the decision about which changes to keep or discard first, before committing to create patches.Fix #5757
Test Plan:
This adds a new command and does not affect any feature code. Build and sync should still be tested since it edits libs used by those scripts.
If you would like to use the new command:
npm run reset_non_patchedYshould reset that file at the end, andNshould not.Submitter Checklist:
git rebase master(if needed).git rebase -ito squash commits (if needed).Reviewer Checklist:
After-merge Checklist:
changes has landed on.