Format all code with cargo fmt
#2385
Merged
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.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
To assuage the concerns noted in #2338 regarding blocking other in progress PRs I have developed a process to rebase branches on top of this branch by formatting each commit. I have already rebased the following PRs which have no merge conflicts with
master
.master...exrook:pr2384 2384
master...exrook:pr2374 2374has conflicts nowmaster...exrook:pr2355 2355has conflicts nowmaster...exrook:pr2352 2352
master...exrook:pr2328 2328
master...exrook:pr2244 2244
master...exrook:pr1956 1956
Additionally I have created
.git-blame-ignore-revs
and added the format commit to it to improvegit-blame
output, see:https://git-scm.com/docs/git-blame#Documentation/git-blame.txt---ignore-revs-fileltfilegt
Instructions/script for updating a branch
Convert current branch - Rebase method (leaves a nice history, manual, for branches with conflicts)
This method may be undesirable for branches with many non format related conflicts, as you will have to fix them for every commit.
git fetch upstream master # Make sure you have the latest upstream changes available
Do as
rebase
instructs to resolve any conflicts here!git rebase dd019055ef5bf4309f15db934407e202caf52e14~ # The commit before the format changes
Format all commits, should not require intervention
Rebase onto the formatted master, should not require intervention
Push rewritten commits
Batch convert PRs: usage
./script.sh <pr numbers>
Will have problems with prs with merge conflicts. You probably want to do this on a fresh clone. Replace
upstream
with the name of yourrust-lang/futures-rs
remoteConvert current branch - Merge method (manual, for branches with many non-format conflicts)