pygit2.RemoteCallbacks.push_update_reference doesn't get full error message
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.7k
- Forks
- 408
- Avg merge
- 2d 57m
- Merged PRs (30d)
- 7
Description
When a push fails on a pre-receive hook, which sends a error message as to why the push failed validation, the message from pygit2.RemoteCallbacks.push_update_reference is only pre-receive hook declined. Is there any way to get the full output from the failed push?
Also, if I raise an Exception on push_update_reference, it's caught somewhere else and re-raised as "GitError: git_push_status_foreach callback returned -7", so, I can't properly raise any kind of exception to clean up anything, or, output any custom error to the user. What would be the proper way, am I missing something here?
Contributor guide
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 by tracing pygit2.RemoteCallbacks.push_update_reference and how failed push status and callback exceptions are propagated. Determine whether the full pre-receive hook output can be exposed and whether callback failures can support cleanup or custom user-facing errors; done means the behavior is covered for both cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, python
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100