fix: Make info dir when it is absent #414
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #413
⚡ Summary
The presence of
.git/info
directory has been taken for granted, but it can be actually nonexistent. This results in an unhandled enoent. I've changed it so the presence of it is made sure when initializing Repository.The point I believe is that
.git/info
could be absent. On the other hand I'm not sure if we can take for granted that.git/hooks
always exists, or the same mishap can occur. At least in my environment the hooks dir is provisioned automatically (where the info is not) but I haven't been able to reason about it documentationally.This does fix my problems but since I'm not really sure what the scope of fix should be, any feedback is welcome. Thanks in advance!
☑️ Checklist