-
-
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
Minor LibGit2 cleanup #35466
Minor LibGit2 cleanup #35466
Conversation
The official git glossary (https://git-scm.com/docs/gitglossary), spells this commit-ish or committish. Since we can't do the former, use the latter consistently. We had three different spellings.
@@ -122,14 +128,13 @@ tree_entry = tree[1] | |||
blob = LibGit2.GitBlob(tree_entry) | |||
``` | |||
""" | |||
function GitObject(e::GitTreeEntry) end |
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.
This function was declaring this signature to return nothing, which is obviously wrong. How do I declare it to just document the signature? @fredrikekre or @KristofferC do you know?
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.
just GitObject(e::GitTreeEntry)
I believe.
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.
Thanks.
Use the _bypath function in GitTree getindex rather than opencoding it using the tree walker.
* Fix spelling of committish The official git glossary (https://git-scm.com/docs/gitglossary), spells this commit-ish or committish. Since we can't do the former, use the latter consistently. We had three different spellings. * Minor LibGit2 API improvement Use the _bypath function in GitTree getindex rather than opencoding it using the tree walker.
The only user facing change is adding
haskey(::GitTree, path)
to go along with getindex, but the internals are refactored.