Pinned Pull Requests on GitHub
blog.zacharyvoase.com
blog.zacharyvoase.com
Github treats them essentially the same, which is just wrong. It's the patch set that is the unit of code review. It's just plain never correct to review a "branch", you review specific suggested changes in isolation. The idea of pulling branches is to merge already-reviewed code from different trees.
Any branch name is just an alias for the latest commit in that branch. For example master is just an alias for the latest commit in master so you can reference that commit without the SHA1 hash. When I submit a pull request for foo/master then push new commits for foo/master, I just changed what master points to so my pull request changes. By using the commit hash you avoid the commit alias problem because new commits won't change what a commit hash references.
In fact, virtually anywhere you use a branch name in git or github you can also use a commit hash.
I never presented this as a problem. But clearly the nature of GitHub's pull request UI is sufficiently misleading (or the documentation sufficiently incomplete) to wrongly convince some smart people that pull requests can always change while you're reviewing them, and that there's nothing you can do about that. In this case, that misunderstanding caused them to ignore the entire feature. I just wanted to point out a neat trick that (probably) not many others had spotted before.
Now, in actual fact I would personally choose to use standard branch-based pull requests anyway, because you get to rebase your branch while work progresses on master. But then again I've never worked on an open-source project with so many interested parties, contributors or even regular committers.
The problem is that github thought it was a good idea to "review" such an object at all. It's the wrong data structure for that. What you want to review is a series of patches, which is also a data structure git supports, but not (quite) 1:1 with a branch head.
But of course modified to suit my needs.