-
Notifications
You must be signed in to change notification settings - Fork 985
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 get_hash function #1962
add get_hash function #1962
Conversation
Can you rebase the PR? |
Done! |
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.
At this point I think I would merge get_file_hash and get_hash and just have a get_hash
that takes either a path
or literal
arg since the logic/arguments is identical
I reworked the PR to merge get_hash and get_file_hash into a common function ( Though I couldn’t completely get rid of |
Any chance you can rebase + fix conflict? I'll merge it after, it looks good. |
Should be fine now :) |
…documentation and tests
As requested, I removed the (I also managed to get rid of |
Co-authored-by: Newbyte <newbie13xd@gmail.com> Co-authored-by: n-tux-tmp <n-tux-tmp@example.com> Co-authored-by: n-tux-tmp <n-tux-tmp@noreply.example.org>
Hello,
I saw the Discourse topic which got no answers yet, so I decided to give it a try (as I need this feature myself).
It’s basically a rough copy of
get_file_hash
but it takes a string literal in parameter instead of a file.It was easier to adapt this function (and tests/documentation) than writing a filter instead. I hope this implementation still satisfies your expectations.
Sanity check:
Code changes
(Delete or ignore this section for documentation changes)
next
branch?If the change is a new feature or adding to/changing an existing one: