3 ms·
Merge commits don't break bisect. People who submit pull requests that don't build, run, and pass tests at every commit break bisect. Rebasing doesn't fix tha
by JoshTriplett 10y ago
Merge commits don't break bisect. People who submit pull requests that don't build, run, and pass tests at every commit break bisect. Rebasing doesn't fix that problem.
Don't build a series of commits where a later one fixes an earlier one; organize them into a logical series of changes, such that the project works after each commit.
- falsedan 10y agoThat's too much work to guard against a rare occurrence. Most junior engineers would think that that workflow is excessively fussy and belt-and-braces (because they haven't seen how useful bisect is).
- JoshTriplett 10y agoI'd love to see some of the major CI systems (like Travis, Appveyor, and Gitlab CI) supporting "build and test every commit" rather than "build and test the final commit".
- patrec 10y agoAgreed, although to do this at acceptable cost you'll often also want a decent build system (a la blaze, that can rebuild and re-test just what needs rebuilding and re-testing) and a lot of CI slaves. That's not a typical setup. Right now build systems don't even do the "build and test the final commit" bit right; it should of course test against a pre-merge (not on the branch) but again that tends to be a pain to set up.
- patrec 10y agoIn practice rebase heavy-workflows squash a lot of commits away; in fact I think the standard workflow with phabricator is sqashing everything in the feature branch into a single commit and then rebasing that in. This has obvious downsides, but it means it's easy to revert and bisect works, which probably does in many cases outweight the downsides.
- JoshTriplett 10y agoSquashing everything is better than applying a series of patches that don't bisect, though it's not quite as nice as providing one logical change per commit.
- patrec 10y agoFully agreed. The problem is that one CI-tested logical change per commit tends to be too painful to set up. I think the attractions of rebase-based workflows are mostly due to tooling limitations (in particular shortcomings of git and CI systems).