8000 refactor(revspec): raise error instead of panicking when parsing `RevspecPattern` by SanchithHegde · Pull Request #303 · cocogitto/cocogitto · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

refactor(revspec): raise error instead of panicking when parsing RevspecPattern #303

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

Merged
merged 2 commits into from
Jul 25, 2023
Merged

refactor(revspec): raise error instead of panicking when parsing RevspecPattern #303

merged 2 commits into from
Jul 25, 2023

Conversation

SanchithHegde
Copy link
Contributor

This PR updates the parsing logic for RevspecPattern to raise an error instead of panicking, by replacing the From<&str> implementation with FromStr, as discussed in #286 (comment).

Let me know if using a separate error enum/struct would be preferable instead of adding an enum variant to Git2Error, and if a TryFrom implementation would also be required.

@cocogitto-bot
Copy link
cocogitto-bot bot commented Jul 9, 2023

✔️ a141e48...b1927c3 - Conventional commits check succeeded.

@oknozor
Copy link
Collaborator
oknozor commented Jul 25, 2023

Hey @SanchithHegde, thanks you for the addition !

@oknozor oknozor merged commit 36d1ea5 into cocogitto:main Jul 25, 2023
@SanchithHegde SanchithHegde deleted the revspec_pattern_from_str branch July 25, 2023 17:35
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