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

Tree __contains__ checks for subdirectories #306

Closed
jleclanche opened this issue Dec 23, 2013 · 0 comments · Fixed by #316
Closed

Tree __contains__ checks for subdirectories #306

jleclanche opened this issue Dec 23, 2013 · 0 comments · Fixed by #316

Comments

@jleclanche
Copy link

This is a really annoying inconsistency:

>>> "foo/boo" in tree
False
>>> tree["foo/boo"]
<_pygit2.TreeEntry object at 0x7f9c44a57318>

I can see why it happens but it's incredibly unnatural.

Similarly, it would be nice if we didn't have to create TreeBuilders for each subdirectory when creating blobs in a subdirectory. eg. be able to do something like treebuilder.insert("foo/bar", ...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant