59 bytes, text/x-review-board-request
The `mach clang-format` command doesn't work well with history rewriting. If I have three commits A, B, C, where C is the tip. If I `hg up A` and `./mach clang-format` (with the intention of following up with `hg amend ; hg evolve `) stuff changed in C gets formatted. This is because clang-format's CommandProvider uses "-r tip^" to express the changes to be formatted. It should be using "-r .^" as that means "the current revision and any changes in the working dir", which is what we're trying to format.
Comment on attachment 8849291 [details] Bug 1348982 - Make 'mach clang-format' format the current revision instead of the tip. https://reviewboard.mozilla.org/r/122110/#review124732 Good catch. Strictly speaking `hg diff -c .` is probably semantically better. But I don't think it really matters in this case.
Attachment #8849291 - Flags: review?(gps) → review+
Pushed by email@example.com: https://hg.mozilla.org/integration/autoland/rev/6270b8fc98ab Make 'mach clang-format' format the current revision instead of the tip. r=gps
Status: NEW → RESOLVED
Last Resolved: 2 years ago
status-firefox55: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.