Stream: general

Topic: General rebasing etiquette


Paul Faria (Nov 13 2019 at 05:11, on Zulip):

When you all rebase, do you usually ensure that your commits build after each rebase conflict resolution? Or do you typically rebase as carefully as possible, but then only run a build once at the end? Do you change your strategy depending on the number of commits in the branch? Is there another alternative I haven't thought of?

nagisa (Nov 13 2019 at 05:36, on Zulip):

there’s no expectation of intermediate commits building at all

nagisa (Nov 13 2019 at 05:36, on Zulip):

when we bisect we bisect merge commits.

pnkfelix (Nov 13 2019 at 05:46, on Zulip):

I sometimes will rebase into intermediate commits, but I agree with @nagisa that we generally don’t expect/force PR’s to preserve buildability. Sometimes the only benefit of fragmenting PR into commits is for reviewability alone

Paul Faria (Nov 13 2019 at 05:57, on Zulip):

Thank you, that's helpful feedback!

centril (Nov 13 2019 at 07:52, on Zulip):

One advantage of buildable commits is that you can more easily split out earlier parts of the PR

centril (Nov 13 2019 at 07:52, on Zulip):

this can be useful for the PR author

centril (Nov 13 2019 at 07:53, on Zulip):

(https://github.com/rust-lang/rust/pull/65324 is an example)

Jake Goulding (Nov 13 2019 at 13:04, on Zulip):

Outside of Rust world, yes, I default to ensuring that every commit builds, lints, and passes tests. When doing an interactive rebase, theres the x command which allows you to run custom scripts like a test suite or linter.

Jake Goulding (Nov 13 2019 at 13:06, on Zulip):

I would muse that my way is the best way (right...) but that the rustc build times prevent me from doing the build / test steps. And the lack of consistently-applied rustfmt means I cannot easily script rustfmt. So I let the broken windows stay broken.

Jake Goulding (Nov 13 2019 at 13:08, on Zulip):

In my own Rust projects (and other languages) I do all the cleanliness. I wouldn't be surprised if I spend more noticeably time reorganizing my commits than most other people. My hope is that future me appreciates it.

Last update: Dec 12 2019 at 01:25UTC