-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Add a customized GitRepositoryError and funnel all Git operations through a method that throws one of those if an operation fails. #2958
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
Conversation
…ough a method that throws one of those if the operation fails. This makes sure that Git failures clients can distinguish from other Process errors (so failure handling can be customized), and that they all have a location.
@swift-ci please smoke test |
Looks like the CI is currently having unrelated issues: |
The macOS test failure seems to be because of not using a new enough |
@Swift-C please smoke test |
@swift-ci please smoke test |
The Linux failures seem to have been due to the SwiftDriver CMake problem. Trying again. |
@swift-ci please smoke test |
@swift-ci please smoke test |
The test failures are different this time but still completely unrelated to this PR:
|
The test failure is the same as in #2970 |
@swift-ci please smoke test |
This makes sure that Git failures clients can distinguish from other Process errors (so failure handling can be customized), and that they all have a location. At present the location for an error during a cloning operation is the remote URL, while the operation for an operation on a local clone is the path of the local clone. We might want to extend this in the future so that local clones also keep track of the URL, but this will require the GitRepository to keep a copy of the associated RepositorySpecifier of its origin remote. This would in turn require a change to the Repository protocol so that all methods take a RepositorySpecificier, and it would require changes to all the clients. So that should be a separate PR.