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
pure go lib for git #481
Comments
If it can entirely replace the git cli and doesn't depend on cgo I'm fine with that |
take care about the performance ;) |
Why go-git instead of https://github.com/libgit2/git2go ? Imo libgit2 is really good |
Because it requires cgo and libgit. |
The first version of Gogs is based https://github.com/gogits/git. We have tried to use pure Go. But it developments slowly and run slower than git command. If the https://github.com/src-d/go-git is full-featured and almost the same performance with git command, I prefer that. |
It would be worth using an interface for git operations and support either pure-go implementation or libgit2, with a build tag. The sqlite backend is also cgit so I don't see why not allowing it in codebase... |
Great idea, we indeed need an interface on |
@lunny I'd rather put the interface in |
@bkcsoft How about mixed the two methods since https://github.com/src-d/go-git maybe not full-feature? |
Hence the proposal for having both in the same repo ( |
+1 for doing this in `go-gitea/git`
|
Continued from #1511
Yes.
My proposal was to use it as the primary API replacing go-gitea/git/
No. I assume it would have good, if not better, performance than other alternatives if the cgo overhead doesn't matter that much. But cgo does affect the developer experience to some extent. |
A performance compare on a git sub command is welcome. For example, get releases page is too slow, if we use this library will retrieve better performance, it's great! |
It should be fairly simple to test performance gains like this:
|
Just a heads-up: I actually made some effort in this direction, it is discussed in issue #491 along with links to my code and some performance numbers. |
If I was to work on integrating gitea with https://github.com/src-d/go-git, where do I start? |
@pjebs I think you could send PRs to https://github.com/go-gitea/git to instead git commands to pure go library. I think it's easier to do it step by step. |
@pjebs Incrementally implementing the exported APIs of https://github.com/go-gitea/git seems to be a good idea. |
@pjebs Follow the suggestion by @typeless and @lunny. I already have a branch where I started doing that, so if you split the |
Give me some time to understand the code base since I only found the repo a few days ago. |
@pjebs I think there are some part has used https://github.com/src-d/go-git and @filipnavara contributed a lot. You can go to |
since we use both (go-git and a git warper) and it doesn't look like go-git can take up for all git tasks I'll close this for now. |
What do you think about https://github.com/src-d/go-git , i use it for some git operations like pull, clone and other and it works fine. As i know gogs work with git via adaptor package, so i can try to create replacement for git operations in pure go. Does this acceptable or not ?
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: