Skip to content
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

Closed
wants to merge 9 commits into from
Closed

WIP: Pkg on libgit2 #11143

wants to merge 9 commits into from

Conversation

wildart
Copy link
Member

@wildart wildart commented May 5, 2015

I made quick port of some Read functions on 'libgit2'. I got a good speed-up on reading packages statuses. On installed 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 in libgit2 interpretation.

@StefanKarpinski
Copy link
Member

I like it – seems like a good time to start kicking the tires on LibGit2.

@johnmyleswhite
Copy link
Member

Bless you, Art.

@tkelman
Copy link
Contributor

tkelman commented May 5, 2015

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.

@tkelman tkelman added the packages Package management and loading label May 5, 2015
wildart added 3 commits May 5, 2015 17:38
`Repo` object auto-frees itself
moved parts to `libgit2` dir
converted github.jl
refactored repository and configuration types (as in LibGit2 pkg)
@wildart wildart changed the title RFC: Pkg on libgit2 WIP: Pkg on libgit2 May 6, 2015
@@ -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")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AbstractString?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Member

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.

@ViralBShah
Copy link
Member

👍

@jakebolewski
Copy link
Member

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.

@ViralBShah
Copy link
Member

@wildart you should have received an invitation with commit access.

end

GitConfig(path::AbstractString) = begin
cfg_ptr = Ptr{Void}[C_NULL]
Copy link
Member

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

@wildart
Copy link
Member Author

wildart commented May 8, 2015

I created art/pkg-libgit2 branch with this work. Is there way to switch this PR to new branch or I need to create new PR?

@tkelman
Copy link
Contributor

tkelman commented May 8, 2015

Is there way to switch this PR to new branch or I need to create new PR?

Maybe through the Github API but not from the web interface as far as I know. May as well just open a new one.

@wildart wildart mentioned this pull request May 8, 2015
2 tasks
@wildart
Copy link
Member Author

wildart commented May 8, 2015

Work moved to #11196

@wildart wildart closed this May 8, 2015
@wildart wildart deleted the libgit branch May 9, 2015 02:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
packages Package management and loading
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants