Sha1 is irreversible. Why can git cat-file-p < SHA1 value > restore the contents of the file?

sha1 is irreversible. Why can git cat-file-p < SHA1 value > restore the contents of the file?

Git
Mar.10,2021

is not a restore, because the hash value here is only an index (globally uniquely identifies what), git reads from the file


generates the file's SHA1 value based on file, and this value can basically be considered to be unique, and the sha1 value is the corresponding relationship between sha1 and file in the changed
git system for each modification of the file. Therefore, you can directly take the sha1 to the specific file content

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b366ec-2b85d.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b366ec-2b85d.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?