You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
doc: show how to use to git to submit smaller and faster PRs
The documentation had for a long time a section that specifically
recommends to submit "smaller PRs" for review:
https://docs.zephyrproject.org/latest/contribute/contributor_expectations.html#defining-smaller-prs
Yet submitters keep submitting large PRs on a regular basis, sometimes
very large ones. See a couple of very recent examples below.
(Reminder: submitting a giant, draft PR for pure _testing_ purposes and
NOT for review is a perfectly fine)
The "natural" explanation is that submitters optimistically and wrongly
believe that dumping a large amount of code at once onto reviewers will
be dealt with faster than in smaller chunks. This is most likely a
contributing factor but most people should quickly learn from bad
experience. Yet we keep seeing large PRs on a regular basis. So there
must be other factors too.
Based on personal but fairly extensive git support experience, another
top reason is likely git usability and some lack of git
knowledge (neither the first nor the last time git usability would have
a significant impact)
To help with this, add to the existing git guide the simple command that
lets split a large submission in several, smaller PRs. This can only
help demystify and promote smaller PRs while barely growing the size of
the documentation.
While at it, also add a couple missing benefits of smaller PRs.
Recent examples of large PRs:
- In the controversial and giant PR
zephyrproject-rtos#77368 (comment)
the exhausted submitter wrote:
> Every time any one person requests a rebase that changes the PR,
> unless there's consensus, there's no mechanism (manual/project process
> or built into GitHub) to know/prevent a different person from rejecting
> the new changes.
That PR had 21 commits (18 in the final version), 82 files changed and
400 (!) comments. The sheer size massively increased the likelihood of
the problem described. Re-submitting it in smaller chunks would
obviously have mitigated that problem. Yet that PR was never split and
stayed huge...?
- In this second example, a large PR was submitted with different
authors. A disagreement emerged about squashing across different
authors:
zephyrproject-rtos#78795 (comment)
If this PR had been split in smaller chunks, then the squashing
discussion might have been avoided entirely. Whether squashing is good or
bad in this particular case is irrelevant (and already discussed at
great in length in zephyrproject-rtos#83117). What matters here is: the submitter lost
that chance by submitting a larger PR with different authors.
Signed-off-by: Marc Herbert <[email protected]>
0 commit comments