sdboyer / gps

your dependencies have arrived
MIT License
270 stars 24 forks source link

remove git binary dependency #158

Open mcuadros opened 7 years ago

mcuadros commented 7 years ago

Using go-git a pure Go git implementation the dependency of the git binary can be removed, also this will give more flexibility at the time of work with git repositories

I will be glad of make a PR with the changes suggested

sdboyer commented 7 years ago

Awesome! I'd love to get rid of the binary dependency, and wouldn't mind avoiding cgo-derived complications from relying on libgit2, either. At the same time, libgit2 offers guarantees about comparable behavior to git itself that I don't know if go-git also offers. If there's anything public/explicit about such guarantees, could you point me to them?

There'd be two basic ways of going about this - either contributing the changes to Masterminds/vcs, or making them directly here. I lean towards the latter, because I expect we'd be able to take advantage of optimizations that would be difficult/a bad idea to try to represent in that project's cross-vcs interface.

mcuadros commented 7 years ago

go-git is being develop to mimic the internal behavior of git, as libgit2 or jgit does. Every component at go-git should works as is expected at cgit. Earlier versions of go-git has been tested against all the repositories at github.com due to the nature of our business. The v4 is still not stable or production ready but we expect to have a stable version the next month.

I prefer do the implementation here since, having as interfaces, as you mention will be a problem.

sdboyer commented 7 years ago

sounds good enough to me to get started on a PR, at the very least :)

The two things I'd highlight as needing close attention are submodule cleanup (see Masterminds/vcs#60) and the export behavior. The latter could really be optimized once things like vendor pruning (golang/dep#120) settle.

mcuadros commented 7 years ago

Oh, I didn't though in submodules, was a more or less forgotten feature at go-git, we will work on it. And I will come back here.

sdboyer commented 7 years ago

Yeah, I also basically wish they didn't exist (as evidenced by the title of that issue).

I look forward to it!

fabulous-gopher commented 7 years ago

This issue was moved to golang/dep#424