Hacker News new | ask | show | jobs
by zegl 1301 days ago
I don't know how stupid this is on a scale from 1 to 10. I've created a wrapper [1] for git (called "shit", for "short git") that converts non-padded revisions to their padded counterpart.

Examples:

"shit show 14" gets converted to "git show 00000140"

"shit log 10..14" translates to "git log 00000100..00000140"

[1]: https://github.com/zegl/extremely-linear/blob/main/shit

4 comments

Other customers also brew-installed: fuck [1]

[1]: https://github.com/nvbn/thefuck

You may want to take a look at the monotonic commit numbering scheme that Git already has, before trying to hack one into the hashes:

https://git-scm.com/docs/git-describe

Why the trailing zero? The article quotes hashes starting with "0000001", or "0000014".

Shouldn't "shit show 14" get converted to "git show 0000014"?

Thank you for addressing my one and only concern with this scheme! No notes.