3 ms·
Yeah, but for this project, why would you choose (as others stated they would or prefer) to call out to an external program instead of using https://github.com/
by johnisgood 1y ago
Yeah, but for this project, why would you choose (as others stated they would or prefer) to call out to an external program instead of using https://github.com/libgit2/git2go https://github.com/libgit2/git2go (libgit2, FFI) for example? For what it is worth, there is also a pure Go implementation: https://github.com/go-git/go-git https://github.com/go-git/go-git (pure Go).
Keep in mind the initial comment, which is "I would have used libgit2 myself in any languages.", and they claimed it is a bad idea due to performance, as opposed to calling out to an external program.
- 9rx 1y ago> and they claimed it is a bad idea due to performance Which, as before, is nonsense.
- johnisgood 1y agoThank you, thought as much. I hope I will get a response from the person / people claiming this.
- 9rx 1y ago> I hope I will get a response from the person / people claiming this. You want more nonsense...?
- johnisgood 1y agoNo, I want people to be informed well, and that requires me to hear their side so I can dispute them. Many people has said they are thankful it calls out to "git" instead of using FFI, which I think is weird, but then there are others who go ahead and say that it is a worse thing to do, and I want people to know that no, it is not.
- bmf-san 1y agoYep, ggc is a wrapper around the git CLI — intentionally so. I chose to shell out to git because it's fast, stable, and has great cross-platform support. Tools like go-git and libgit2 are interesting (and I’ve looked into them), but they come with their own tradeoffs like performance, features, and build complexity. That said, I totally get the curiosity — thanks for the discussion!
- 9rx 1y ago> No, I want people to be informed well, and that requires me to hear their side so I can dispute them. What's in it for them?
- throwaway894345 1y agoThe main reason I cited for avoiding CGo was the impact on the code base, not the performance overhead. I’m not advocating for shelling out to the Git CLI, but rather preferring go-git unless there is a compelling reason to avoid it.