-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Reimplement Git using libgit2 #4158
Comments
I believe that linking exception is sufficiently liberal although I wonder why they didn't use LGPL? This is definitely a good idea and it would be great if someone wants to tackle it. I've started to a couple of times, but it's a little daunting. |
I would like to attempt to do this. I have been reading about libgit2 and looking through implementations of it in other languages. It seems like it will be more straightforward considering how Julia can call C directly. It looks like external dependencies are in deps/, so that's where the link to libgit2 would go if I understand correctly. I would then need to set up the Makefile to compile libgit2 along with the rest of the external dependencies. This is where I'm not sure what to do. How would I structure the implementation of the git commands? Could it be a pure Julia implementation rather than requiring extra C for bindings like Rugged? I see that there is already a module for git in Julia's base: git.jl |
Yes, the idea is to have it be in pure Julia and provide a nice Julia-Level API on top of the raw C api. Probably the best way to go for you, would be to start working in a LibGit2.jl package outside of Base, an then once that matures, we can import it into Base eventually. Awesome that you're working on this! |
That actually makes a lot of sense, thanks for the advice! I'll look through the existing packages to find one that has an external dependency to guide myself. Are there any that you know of off of the top of your head? |
You can check out the ODBC package, which has been around a while now (in I'd be willing to help out as well. -Jacob
|
Great! Glad you're taking this on. It seems like it will be more straightforward considering how Julia can
Feel free to touch base here or the dev list if you have questions. Have Kevin |
Yes, this is an excellent project. It will make Pkg like 100 times faster for many operations. |
Other than the packages @karbarcca mentioned, GnuTLS, Nettle or ZMQ might be good guides as well. |
Now substantially easier as I have cut down the size of the |
Added libgit2 to deps Makefile so that it builds with other submodules and installs its targets in ~/julia/usr/ Ref JuliaLang#4158
- Changed libgit2.so to libgit2.$(SHLIB_EXT) to maintain convention and make more generic - Added a USE_SYSTEM_LIBGIT2 to check before adding libgit2 to stage 1 deps list - A few cosmetic changes Ref JuliaLang#4158
Keeping the "lib" suffix in libgit2 breaks this line line 176: cp -a $(BUILD)/$(JL_LIBDIR)/lib$${suffix}*.$(SHLIB_EXT)* $(PREFIX)/$(JL_PRIVATE_LIBDIR) ; which results in build system errors. This commit fixes that. Ref JuliaLang#4158
Added libgit2 to deps Makefile so that it builds with other submodules and installs its targets in ~/julia/usr/ Ref JuliaLang#4158
- Changed libgit2.so to libgit2.$(SHLIB_EXT) to maintain convention and make more generic - Added a USE_SYSTEM_LIBGIT2 to check before adding libgit2 to stage 1 deps list - A few cosmetic changes Ref JuliaLang#4158
Keeping the "lib" suffix in libgit2 breaks this line line 176: cp -a $(BUILD)/$(JL_LIBDIR)/lib$${suffix}*.$(SHLIB_EXT)* $(PREFIX)/$(JL_PRIVATE_LIBDIR) ; which results in build system errors. This commit fixes that. Ref JuliaLang#4158
closing, being implemented by #11196 |
Right now, when a large number of packages are installed, updating is sloooowww. The bottleneck seems to be the frequent calls to git. It would be nice if Git were reimplemented using libgit2 (http://libgit2.github.com/, source at https://github.com/libgit2/libgit2).
The only possible issue concerns licensing: libgit2 is a GPL2, with a linking exception that states:
See: https://github.com/libgit2/libgit2/blob/development/COPYING
Is this permissive enough to include with Julia?
cc: @StefanKarpinski
The text was updated successfully, but these errors were encountered: