Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Add Tree#find_blob. Account for symlink blobs in Tree class. #59
Add Tree#find_blob. Account for symlink blobs in Tree class. #59
Changes from all commits
1e3063f
d7881be
9d60ba2
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
I'm not loving this name of this class method. One reason is that the name suggests that the method returns a tree entry based on hash input ("from hash"), but the name of the first argument and the body of the method imply that an
entry
(whatever that is) is transformed into a hash (thus the other way around).A second reason is that I have no sense of what a
rugged_hash
is. It seems as if is is an ordinary hash originating from a method inrugged
, but then I don't see why we need to know the origin of the hash.Would it make sense to rename this to something like
tree_entry_to_hash(entry, root='')
?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.
(Sorry, I know this is merged already.)
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.
Good points, thanks! The wording is tricky since a tree entry is essentially just a hash representation of an object in a git tree, as used by rugged, and we want to convert this into our own hash representation of an object in a git tree.
tree_entry_to_hash
misleadingly sounds as if what we're passing in is a hash instead of a tree entry. What about something likecanonicalize_tree_entry
?