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

Minor LibGit2 cleanup #35466

Merged
merged 3 commits into from
May 29, 2020
Merged

Minor LibGit2 cleanup #35466

merged 3 commits into from
May 29, 2020

Conversation

Keno
Copy link
Member

@Keno Keno commented Apr 13, 2020

The only user facing change is adding haskey(::GitTree, path) to go along with getindex, but the internals are refactored.

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
Copy link
Member Author

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?

Copy link
Contributor

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.

Copy link
Member Author

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.
@simonbyrne simonbyrne closed this May 28, 2020
@simonbyrne simonbyrne reopened this May 28, 2020
@simonbyrne simonbyrne added the libgit2 The libgit2 library or the LibGit2 stdlib module label May 28, 2020
@simonbyrne simonbyrne merged commit 3c63934 into master May 29, 2020
@simonbyrne simonbyrne deleted the kf/libgit2minor branch May 29, 2020 14:23
simeonschaub pushed a commit to simeonschaub/julia that referenced this pull request Aug 11, 2020
* 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.
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.

3 participants