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

transport err typing #201

Merged
merged 3 commits into from
Sep 19, 2021
Merged

transport err typing #201

merged 3 commits into from
Sep 19, 2021

Conversation

Byron
Copy link
Owner

@Byron Byron commented Sep 19, 2021

Fix for #200

  • structured error in git-packetline
  • a flag to use ref-in-want in order to reproduce the issue on a high level - fails to reproduce as the current test suite operates with servers who don't support this feature at all. Unless there is a way to want invalid SHA1s, it's hard to trigger an error.
  • cause a packet-line based error
  • obtain underlying packetline errors from io errors

Right now it only works with 'ref-in-want', but in future it could
actually act as a filter.
…for easier matching and figuring out what actually happened.
For now, this is left entirely to users of the API, but one day
I imagine that some parsing could be done on gitoxide's side as well.
@Byron Byron merged commit f293b63 into main Sep 19, 2021
@kim
Copy link
Contributor

kim commented Sep 19, 2021

Thanks!

the current test suite operates with servers who don't support this feature at all

Does this not work?:

git -C uploadpack.allowrefinwant daemon …

@Byron
Copy link
Owner Author

Byron commented Sep 19, 2021

Does this not work?:

Thanks so much, I didn't think of the fact the the these tests use the daemon which is in fact configurable 🤦‍♂️. This works perfectly, and now there is a test to verify reasonable errors chains in case upload-pack bails out:

Error: The server response could not be parsed

Caused by:
    0: Upload pack reported an error
    1: unknown ref refs/heads/does-not-exist

@Byron Byron deleted the transport-err-typing branch February 9, 2022 00:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants