I wonder about performance, though. Why is the author's method slower than the package I linked?
I wonder about performance, though. Why is the author's method slower than the package I linked?
I've been using githashcrash [1], but it's only running on the CPU, which is why it's a bit slower. :-)
- Hey Bob, why did you rename the 'pick_person' function to 'choose_desirable_candidate'?
- git made me do it
That's some nice modularization. Good job!
[1]: https://github.com/zegl/extremely-linear/blob/0011003da13132...
A git commit is composed of a number of headers (key: value fields) and a commit message.
There is a set of "standard headers" (tree, parent*, author, committer, encoding?), but then you can add more. In fact there's a set of semi-standard headers, as in headers git itself will add under some conditions: `gpgsig` and `gpgsig-sha256` if the commit is signed, and I think `mergetag` for signed tags. They are documented as part of the signature format but they're not "baseline" features: https://git-scm.com/docs/signature-format#_commit_signatures
But because of this, a git client should support arbitrary commit headers, and round-trip them even if it does not expose them.
I have this ugly code that finds the salt given the target hash, and another that actually creates the commit given the salt. Is not very useable, but I'll leave it here for anyone that finds it interesting: https://gitlab.com/pedroteosousa/useless-git-tools/-/tree/ma...
Of course if the date only has seconds resolution it may be to big of a shift to be reasonable.