Skip to content

Added type to tree entry object #7

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

Closed
wants to merge 1 commit into from

Conversation

dubcanada
Copy link

Hey,

I needed quick access to determine easily if the tree entry object is another tree or a blob. So since this is already retrieved, just not returned I added it to the returned array.

@alexandresalome
Copy link
Member

Sorry, you can already have this information by testing type of the object: $entry[1] instanceof Tree or $entry[1] instanceof Blob.

@dubcanada
Copy link
Author

Is there an instanceOf submodule? Or a way to determine if the "tree" is actually a "submodule"?

@alexandresalome
Copy link
Member

That's not implemented, but surely should be.

@alexandresalome
Copy link
Member

Closed in favor of #12

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

Successfully merging this pull request may close these issues.

2 participants