-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Convert plumbing.ErrObjectNotFound to git.ErrNotExist in getCommit #10862
Conversation
Codecov Report
@@ Coverage Diff @@
## master #10862 +/- ##
==========================================
- Coverage 43.40% 43.39% -0.01%
==========================================
Files 593 593
Lines 83271 83276 +5
==========================================
+ Hits 36140 36141 +1
Misses 42640 42640
- Partials 4491 4495 +4
Continue to review full report at Codecov.
|
if err == nil { | ||
gogitCommit, err = repo.gogitRepo.CommitObject(tagObject.Target) | ||
} | ||
// if we get a plumbing.ErrObjectNotFound here then the repository is broken and it should be 500 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Although I'd prefer a "your repository is broken" error. 😉
Please send backport |
…o-gitea#10862) Co-authored-by: Lauris BH <[email protected]> Co-authored-by: guillep2k <[email protected]> Co-authored-by: Antoine GIRARD <[email protected]>
…10862) (#10868) Backport #10862 Signed-off-by: Andrew Thornton <[email protected]> Co-authored-by: Lauris BH <[email protected]> Co-authored-by: guillep2k <[email protected]> Co-authored-by: Antoine GIRARD <[email protected]>
Similar to a number of other bugs we need to handle plumbing.ErrObjectNotFound and convert to git.ErrNotExist appropriately.
Fix #10852