The following is my setup but I encounter an unknown git error occurred; code=NotFound (-3) errors when I invoke spr diff. (edit: solved by re-cloning git@github.com:llvm/llvm-project.git)
% git push -u maskray asan-stack-safety # not needed, but I use my repository to save the work
% spr diff # a PR is created in llvm/llvm-project and the commit message contains "Pull Request" now
% edit ...
% git commit --amend
% spr diff
🛑 an unknown git error occurred; code=NotFound (-3)
I have figured it out. fetch = +refs/heads/*:refs/remotes/origin/* should be used. fetch = +refs/heads/main:refs/remotes/origin/main would lead to an unknown git error occurred; code=NotFound (-3).
error: unknown option `no-write-fetch-head’
git 2.19 looks too old. Perhaps 2.30+ or 2.40+ will work?