-
-
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
WIP: Pkg on libgit2 #11143
WIP: Pkg on libgit2 #11143
Conversation
I like it – seems like a good time to start kicking the tires on LibGit2. |
Bless you, Art. |
Yay! This would need some tweaking of appveyor.yml to run the pkg test there, but worth doing within this PR to get a sense of how much additional time that takes. There's also a pretty good reason for the 2 to be part of the name of libgit2, it's not a version number. There's already a "libgit" that is a component of command-line git (though I don't think it's commonly built as a shared library or really used as a library by external applications). Better to avoid ambiguity and use the actual name in our wrappers. |
`Repo` object auto-frees itself
moved parts to `libgit2` dir converted github.jl refactored repository and configuration types (as in LibGit2 pkg)
@@ -10,7 +10,8 @@ const AUTH_DATA = Dict{Any,Any}( | |||
) | |||
|
|||
function user() | |||
if !success(`git config --global github.user`) | |||
usr = LibGit2.lookup(String, LibGit2.GitConfig(), "github.user") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AbstractString?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the LibGit2.jl library you should be able to use LibGit2.GitConfig["github.user"]
, it may be too much code to transfer the whole config business over.
👍 |
Cool! @ViralBShah could we give @wildart push access and move this to a branch on the main repo? It would be easier to work on and contribute to if that case. One thing that I never got around to changing in LibGit2 was that all objects derived from a repo need to keep a reference to the repo object they were created from. You will get quite far and only later realize that this is a problem. |
@wildart you should have received an invitation with commit access. |
end | ||
|
||
GitConfig(path::AbstractString) = begin | ||
cfg_ptr = Ptr{Void}[C_NULL] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wildart these can all be Ref{Ptr{Void}}(C_NULL)
's now
I created |
Maybe through the Github API but not from the web interface as far as I know. May as well just open a new one. |
Work moved to #11196 |
I made quick port of some
Read
functions on 'libgit2'. I got a good speed-up on reading packages statuses. Oninstalled
call, I have 10x speed improvement comparing to older version.As it was mentioned in #7584, porting will be not straight forward translation of
git
commands into 'libgit2' calls. Some calls are quite convoluted inlibgit2
interpretation.