-
Notifications
You must be signed in to change notification settings - Fork 16
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
Replace Git CLI connector with JGit #432
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Will only be created if the necessary username and password properties are specified.
Constructs a partially complete `ls-remote` command. The bean definition only sets the used credentials and default timeout duration, if and only if they are specified. It is up to the dependents to further set the remote URL, or override the previously set defaults.
Constructs a partially complete `clone` command, similarly to the `ls-remote` command. Does not set the URL, depth or filesystem location.
This new bean implementation is completely decoupled from the `GitConnector`, which I plan to remove in the future anyway. As for the actual implementation, it has been changed so that the logic no longer relies on `ExternalProcess`.
Still not 100% ready, should have more robust exception handling to detect exact failures. `TransportException` is too broad, and may even encapsulate cases where the check should be undefined as opposed to a failure. Then again, this should not be too big of an issue, since we check with HTTP in the event of Git failures.
This will probably only be used to override configuration properties at runtime.
The goal of this class is to allow a custom configuration for JGit that does not depend on the system or user settings. At the same time, this class acts as a decorator, calling all other underlying methods of the delegate.
Support was added through the `ghs.git.config` application property. The properties are specified within a `Map`, and a `InitializingBean` is put in charge of translating these `application.properties` entries into corresponding Git configurations. The documentation has also been updated to reflect these changes.
No longer needed since we do things programmatically. Corresponding README.md section has also been removed.
Was used in the now-deleted `GitConnector`, no longer needed as Git exceptions are now all mapped by JGit.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Should provide more stability, while also removing external dependency on the
git
executable.