-
Notifications
You must be signed in to change notification settings - Fork 64
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
Allow to use with Git CLI #146
Comments
Seems like a separate addin to me, there's some fundamental differences between libgit and git cli scripts. Essentially an fairly complete libgit to cli abstraction would need to be created. |
The downside of having it in a separate addin is that recipe scripts (like e.g. Cake.Issues.Recipe or Cake.Recipe) would need to implement the abstraction themselves if they want to have support for both, except a third addin which implements the abstraction is created, but this sound quite complicated to maintain, keep up to date and compatible. The advantage of separate addins would be that we can get rid of LibGit2Sharp completely (but this won't help if both addins were used together in a recipe script). |
One way to solve not even loading libgit could be to move current Cake.Git libgit implementation out of process too, and have a common cli protocol. between the different git provider wrappers in Cake.Git. Would add complexity though, and likely a noticeable performance hit, especially since there's not a 1:1 mapping between git cli scripts and libgit library. |
Using LibGit2Sharp has some limitations and can lead to runtime errors. In some cases Git CLI is available and could be used to achieve the task. We could add a global switch to the addin to define if the addin should run in LibGit2Sharp or Git CLI mode and then have separate implementation for every alias (one with LibGit2Sharp, another with Git CLI).
Ideally it would not load LibGit2Sharp when used in Git CLI mode, but this would require a bigger refactoring and have LibGit2Sharp manually loaded at runtime.
The text was updated successfully, but these errors were encountered: