Closed
Bug 1348982
Opened 5 years ago
Closed 5 years ago
mach clang-format doesn't format the current revision
Categories
(Firefox Build System :: Mach Core, enhancement)
Firefox Build System
Mach Core
Tracking
(firefox55 fixed)
RESOLVED
FIXED
mozilla55
Tracking | Status | |
---|---|---|
firefox55 | --- | fixed |
People
(Reporter: cpearce, Assigned: cpearce)
Details
Attachments
(1 file)
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 hidden (mozreview-request) |
Comment 2•5 years ago
|
||
mozreview-review |
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 gszorc@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/6270b8fc98ab Make 'mach clang-format' format the current revision instead of the tip. r=gps
Comment 4•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/6270b8fc98ab
Status: NEW → RESOLVED
Closed: 5 years ago
status-firefox55:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
Updated•4 years ago
|
Product: Core → Firefox Build System
You need to log in
before you can comment on or make changes to this bug.
Description
•