6 ms·
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
by zegl 4y 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 https://github.com/zegl/extremely-linear/blob/main/shit
- informalo 4y agoOther customers also brew-installed: fuck [1] [1]: https://github.com/nvbn/thefuck https://github.com/nvbn/thefuck
- thih9 4y agoWhy the trailing zero? The article quotes hashes starting with "0000001", or "0000014". Shouldn't "shit show 14" get converted to "git show 0000014"?
- couchand 4y agoThank you for addressing my one and only concern with this scheme! No notes.
- anderskaseorg 4y agoYou 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 https://git-scm.com/docs/git-describe