Bob clones the project and creates a local branch A
from master
.
Bob adds some useful helper classes cleaning/refactoring unit tests setups and clean all exising tests thanks to them.
Bob commits, pushes to remote server, then creates a pull request in order to get a code review of this refactoring from John.
John, leading the project, is busy for a week so can't review it immediately.
After asking for code review, Bob wants to write some brand new test files and set of classes ending up with another separated pull request since it is considered as working on a new feature.
Obviously, Bob wants to use his new helpers for those test files.
Which strategy to adopt:
For those new unit tests, Bob should create a
B
branch derived frommaster
and notA
sinceA
has not being reviewed yet. Drawback is that he can't use his unit test helpers yet since not existing inB
.Bob should wait for the code review of the first pull request, merge to
master
, and then deriveB
frommaster
. During this time, he should focus on other works that do not depend on his previous pull request.Bob should derived
B
fromA
and use those helpers, taking the risk thatA
won't be accepted after review. Obviously leading to a rejection ofB
.John should shake his ass and as a good leader, should review the first pull request in a short time so that Bob can chain.
What is a good practice to handle dependencies between multiple pull requests in series?