Why do open source projects use emailed patches vs. published branches/PRs?
I'm distinguishing the following three states:
1. email: contributors email patches to a mailing list
2. published branches: contributors publish branches containing their commits, but there is no code review / commenting interface (a "pull request")
3. pull request: a published branch with a code review / commenting interface
Reasons for/against published branches over email:
- Unmerged work might be lost, e.g. if a contributor publishes their proposed branch to a server hosted by a private company and both the contributor and the hosting company disappear.
- Email may cause character encoding issues, published branches do not have this problem
- The branch name acts as a tag: the patch set may be appended to or rebased while retaining the same name. Sending successive emails with different patch versions creates a mess. EDIT: Reword as: "The branch names acts as a constant label, referencing a changeset which may evolve during development and review"
Reasons for/against PRs over published branches:
- Inline commenting makes code review very convenient. The PR records the review, the responses and the final sign-off / decision.
- But comment metadata belong to whoever owns the server hosting the PR and therefore may be lost
(Emacs has recently moved to git and I believe the maintainers would ideally like to use published branches / pull requests.)