Unexpected Rugged::ZlibError in Commit#header_field
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 2.3k
- Forks
- 293
- PR merge metrics
- No merged PRs in 30d
Description
rugged_exception_raise seems to raise the wrong exception after a specific series of method calls.
Repository#lookupRepository#read_headerCommit#header_field(with args that will cause an exception)
The final call should raise a RuntimeError afaict, but it actually raises a Rugged::ZlibError.
Here's some tests that demonstrate this behavior.
#563 actually fixes this specific case, because it catches the GIT_ENOTFOUND without calling rugged_exception_check, but it seems like there might be an underlying problem as well that should be fixed.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked tests demonstrating the sequence of Repository#lookup, Repository#read_header, and Commit#header_field, then trace how rugged_exception_raise handles the resulting error. Compare the observed Rugged::ZlibError with the expected RuntimeError and verify that the underlying exception behavior is corrected without regressing the case addressed by #563.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, ruby
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100