tool report: spr
I've been using spacedentist/spr
(docs) (not to be confused with
ejoffe's tool of the same name) to send PRs. If you like Gerrit's model of
one commit == one review, you may like spr. Phabricator's arc tool is also
similar.
Behind the covers, when spr diff --cherry-pick is invoked (on HEAD), it
creates a PR and puts a pointer to that PR in the form of text in HEAD's commit
message. The PR actually points to a hidden spr/... branch that it's
managing. When you invoke diff again on your amended commit, it figures out
the PR by creating new synthetic commits in its branch. Github, which sometimes
likes to lose review comments if you force push your PR branch, is none the
wiser. See this issue
comment
for a more accurate explanation.
My full workflow involves a wrapper which uses fzf to choose any commit between origin/main...HEAD
and invoke spr on that one by abusing GIT_EDITOR in an interactive rebase.