8000 Fix nil pointer panic when omitting FetchOptions by schrej · Pull Request #368 · go-git/go-git · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix nil pointer panic when omitting FetchOptions #368

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

Closed
wants to merge 1 commit into from

Conversation

schrej
Copy link
@schrej schrej commented Aug 23, 2021

When omitting FetchOptions when calling any of the fetch methods, a nil pointer dereference occurs. This PR fixes this by creating FetchOptions object when the parameter is nil.

@mcuadros
Copy link
Member

Options are never optional.

@mcuadros mcuadros closed this Aug 30, 2021
@schrej
Copy link
Author
schrej commented Aug 30, 2021

Then why does the method expect a pointer?

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
0