Skip to content
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

push: set generic error in push_negotiation cb #6675

Merged
merged 1 commit into from Dec 14, 2023
Merged

Conversation

ethomson
Copy link
Member

When a user returns -1 in a push_negotiation callback, we set the error to whatever's hanging out in the buffer, probably something about a missing configuration entry.

Clear the error buffer before invoking the callback, so that if a user does not set an error message in their callback that we can detect. If there is no error but -1 is returned, set a generic error message.

Fixes #6672

When a user returns `-1` in a `push_negotiation` callback, we set the
error to whatever's hanging out in the buffer, probably something about
a missing configuration entry.

Clear the error buffer before invoking the callback, so that if a user
does not set an error message in their callback that we can detect. If
there is no error but `-1` is returned, set a generic error message.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Returning non-zero from push_negotiation callback causes git_remote_push to fail with missing config errors
1 participant