-
-
Save havenwood/38a9b504d815536a88a03ce794334102 to your computer and use it in GitHub Desktop.
What is it git shasums?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
message=$(git cat-file commit HEAD) | |
message_character_count=$(echo -n "$message" | wc -c | tr -d " ") | |
checksummed="commit $message_character_count\0$message" | |
echo -ne "$checksummed" | openssl sha1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment