Reviewing so called Pull Requests at $dayjob
Reviewing so called Pull Requests at $dayjob
2026-01-14
In the last three years I spend quite some time being embedded in a customer's team for my $dayjob.<br>They use a lovely Microsoft product to host the git repositories<br>and do so-called "pull requests"(PR)#0 to bring changes into the master branch.<br>As expected from a Microsoft product the UI to review a PR is absolutely horrible.<br>Another problem,<br>as with all web-based review interfaces,<br>is reviewing iterations after the initial review.
Let's say I create a PR and get first feedback,<br>e.g. some smalls nits or oopsies I included in one of my commits.<br>As a<br>good citizen<br>I will not create new commits to fix those things,<br>but will amend those fixes to that commit where it should have been done in the first place.<br>With an traditional email-based workflow<br>I would wait for some time to collect all feedback,<br>fixup all my commits and then send a v2.<br>With those web-based workflows I would need to create another PR<br>or I can replace the previous version by doing a force push.<br>After a force push the previous version is gone<br>and as a reviewer I would have to review the complete patch set again.
When being assigned as a reviewer to a PR I usually workaround those deficiencies the following way,<br>assuming my coworker wants to merge branch origin/feature<br>and force pushes after amending the commits#1:
Creat branch from remote:<br>git checkout -b v1 origin/feature
Review commits:<br>git log -p --reverse origin/master..
Give feedback, wait for them to fix it
Fetch and creat branch from remote:<br>git fetch; git checkout -b v2 origin/feature
Now I have a v1 and v2 as I would have with the traditional workflow<br>and can use git-range-diff(1) to compare both revisions:<br>git range-diff origin/master..v1 origin/master..<br>If the commits are a horrible mess<br>(at $dayjob we allow squashing at merge)<br>I use git diff origin/master instead of the git log -p --reverse step.<br>For the patch review step (with git log -p --reverse) I will usually skim all the commits.<br>If I want to add more than just one or two comments,<br>I usually pipe the log into my editor so that I can add comments while reading the changes:
git log -p --reverse origin/master.. | sed 's/^/> /' | vim -c 'set filetype=mail' -
When done doing the review I just need to copy my comments into the web interface -<br>which is still annoying, but less so.
0: There is nothing pulled in this process...
1: Works the same if they create a new PR, just base v2 on the branch of the new PR
Last modified: 2026-01-14T23:15:04Z