This repository was archived by the owner on Sep 3, 2025. It is now read-only.
Make init more proactive in reporting errors
#55
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 #35
This pull request fixes the remaining item in #35 (
git-bundle-server initbehaves incorrectly when the specified route already exists). The update to fix this revealed a different bug affecting usage ofReadRepositoryStorage()(repairand, as of this PR,init) when the bundle server directory structure hasn't been created yet.initto exit if it receives an error fromCloneBareRepo(), rather than trying to continue with creating a base bundle (as it does now).ReadRepositoryStorage()by ensuringReadDirRecursive()catches "missing entry" errors and returns an empty result rather than an error.CreateRepository(). If the route is found in the results ofReadRepositoryStorage(), exit with an error.