spacedentist / spr

Submit pull requests for individual, amendable, rebaseable commits to GitHub
https://getcord.github.io/spr/
MIT License
376 stars 33 forks source link

`an unknown git error occurred; code=NotFound (-3)` #184

Open MaskRay opened 5 months ago

MaskRay commented 5 months ago

From https://discourse.llvm.org/t/using-getcord-spr/76097 : spr diff updating an existing pull request may give this error.

% 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)
% git gc --aggressive --prune=now # very slow
% spr diff
  🛑  an unknown git error occurred; code=NotFound (-3)

Unfortunately, I cannot reproduce this error on other repositories. I made a newer clone of git@github.com:llvm/llvm-project.git and succeeded with one pull request. Nevertheless, file the issue in case others encounter a similar error and hopefully contributors can help improve the error message? I am happy to run more commands on my local broken llvm-project repository.

MaskRay commented 5 months ago

I can now reproduce the error in my new llvm-project repository for other pull requests...

% spr amend
b128ce5 [RISCV] Restore DW_EH_PE_uleb128 call site encoding for .gcc_except_table
  🛑  an unknown git error occurred; code=NotFound (-3)
% spr diff
  🛑  an unknown git error occurred; code=NotFound (-3)

The lack of more detailed diagnostics is not helpful...