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

Revamp libgit2 owner interface. #20786

Merged
merged 3 commits into from
Feb 26, 2017
Merged

Revamp libgit2 owner interface. #20786

merged 3 commits into from
Feb 26, 2017

Conversation

simonbyrne
Copy link
Contributor

It seems that some objects can be owned by non-repo objects. This makes the code a bit more general to allow for this.

It seems that some objects can be owned by non-repo objects. This makes the code a bit more general to allow for this.
@simonbyrne simonbyrne added the libgit2 The libgit2 library or the LibGit2 stdlib module label Feb 24, 2017
@@ -48,7 +48,7 @@ function Base.sort!(w::GitRevWalker; by::Cint = Consts.SORT_NONE, rev::Bool=fals
return w
end

repository(w::GitRevWalker) = w.repo
repository(w::GitRevWalker) = w.owner
Copy link
Sponsor Member

Choose a reason for hiding this comment

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

Asking for a repository and getting something else seems a bit iffy.

Copy link
Sponsor Member

Choose a reason for hiding this comment

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

Although, I guess for GitRevWalker you know that the owner is a repository?

Copy link
Contributor Author

@simonbyrne simonbyrne Feb 24, 2017

Choose a reason for hiding this comment

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

exactly, it was just a field rename

@@ -53,15 +50,16 @@ function Base.getindex(tree::GitTree, i::Integer)
te_ptr = ccall((:git_tree_entry_byindex, :libgit2),
Ptr{Void},
(Ptr{Void}, Csize_t), tree.ptr, i-1)
return GitTreeEntry(te_ptr, false)
return GitTreeEntry(tree, te_ptr, false)
Copy link
Contributor

Choose a reason for hiding this comment

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

<3

@tkelman
Copy link
Contributor

tkelman commented Feb 25, 2017

does PkgDev rely on any of these things that are being renamed or changing api?

@simonbyrne
Copy link
Contributor Author

simonbyrne commented Feb 25, 2017 via email

@ararslan ararslan merged commit f2b03d4 into master Feb 26, 2017
@ararslan ararslan deleted the sb/libgit2/owner branch February 26, 2017 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
libgit2 The libgit2 library or the LibGit2 stdlib module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants