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

Empty tree gives a parse error #79

Closed
taralx opened this issue May 8, 2021 · 1 comment
Closed

Empty tree gives a parse error #79

taralx opened this issue May 8, 2021 · 1 comment
Assignees

Comments

@taralx
Copy link
Contributor

taralx commented May 8, 2021

Tree parsing is defined as all_consuming(many1(parse_entry)), which rejects the (valid) empty tree. I'm pretty sure that should be many0.

@Byron
Copy link
Owner

Byron commented May 8, 2021

Thanks for pointing this out - I couldn't agree more! These trees seem to be a true rarity in real world repositories, but it's not a reason to fail either :).

If you feel like becoming a contributor, a PR for this would be very welcome. It should be trivial to drop down an empty file for a test and see it succeed with the fix applied.

@Byron Byron added the bug label May 8, 2021
@Byron Byron self-assigned this May 8, 2021
@Byron Byron closed this as completed in d34fd19 May 8, 2021
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

No branches or pull requests

2 participants