You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm curious if you have any thoughts on what higher-level APIs for fetch, clone, merge, pull, and push operations might look like. As it stands, it looks like there's a bit of inconsistency among the backends with respect to how these operations are performed. As far as I can tell, this is how these operations are supported currently:
Fetch: Provided by Git.Libgit2.lgRemoteFetch. It looks like MonadGit used to have a remoteFetch method.
Clone: Provided by lgRemoteFetch followed by Git.Working.checkoutFiles. However, Bindings.Libgit2.Clone is also provided; it's not clear what advantages using libgit2's convenience function for this might be.
Merge: At a low level, the caller can implement whatever "merge" strategy they want by directly manipulating blobs and trees, and creating a commit with multiple parents. However, it would be useful to provide an API for writing conflicts to the index for compatibility with the git command line tool. It doesn't look like the readIndex or writeIndex methods are implemented anywhere. libgit2 provides a handy set of merge utility functions that'd be useful in the frontend API as well.
Pull: Provided by lgRemoteFetch plus merging at a low-level with blobs and trees.
Push: We have Git.Commit.Push.pushCommit, but something in Git.Libgit2 that takes advantage of libgit2's (likely more efficient?) push functionality would be handy.
Am I missing anything obvious/more convenient here?
A potential issue with introducing a frontend API for these operations is the difference in functionality among existing and future backends. Perhaps MonadGit could be broken into smaller classes, allowing backends to implement specific subsets of the frontend API capabilities.
The text was updated successfully, but these errors were encountered:
@TravisWhitaker Yes, someone to help move things forward would be fantastic. I haven't had much time for gitlib lately, but I'd be more than happy to assist.
Hi John, thanks for your work on these packages!
I'm curious if you have any thoughts on what higher-level APIs for fetch, clone, merge, pull, and push operations might look like. As it stands, it looks like there's a bit of inconsistency among the backends with respect to how these operations are performed. As far as I can tell, this is how these operations are supported currently:
Git.Libgit2.lgRemoteFetch
. It looks likeMonadGit
used to have aremoteFetch
method.lgRemoteFetch
followed byGit.Working.checkoutFiles
. However,Bindings.Libgit2.Clone
is also provided; it's not clear what advantages using libgit2's convenience function for this might be.git
command line tool. It doesn't look like thereadIndex
orwriteIndex
methods are implemented anywhere. libgit2 provides a handy set of merge utility functions that'd be useful in the frontend API as well.lgRemoteFetch
plus merging at a low-level with blobs and trees.Git.Commit.Push.pushCommit
, but something inGit.Libgit2
that takes advantage of libgit2's (likely more efficient?) push functionality would be handy.Am I missing anything obvious/more convenient here?
A potential issue with introducing a frontend API for these operations is the difference in functionality among existing and future backends. Perhaps
MonadGit
could be broken into smaller classes, allowing backends to implement specific subsets of the frontend API capabilities.The text was updated successfully, but these errors were encountered: