Add Git blob sha1 to checksums returned with info
This can be handy for identification in a Git context
I would like to take this issue @pombredanne ,
appart from just including in the final data, do you want me to also take care of all the formats and include git blob sha1 whenever using -i flag
@pombredanne Please review the PR #902 and let me know the changes whenever you can.
Hii @pombredanne sir, I am new to open source, I would like to solve this issue, can you please guide me through how can I help with this issue.
@D-lang14 sorry for the late reply!
The checksum computation is in commncode.hash alright, therefore this would mean adding this in the scan for --info here https://github.com/nexB/scancode-toolkit/blob/cce8cbc64746ed58f2f0a9bf03d6c3500bd7cc1c/src/scancode/api.py#L322 ... plu fixing all the tests
One more motivation to address this is that Software Heritage actually uses Git-blob-style SHA1s, too, also to identify content that was not originally stored in Git!
@AyanSinhaMahapatra we should schedule this in the next release
We already had this functionality in commoncode.hash with https://github.com/aboutcode-org/scancode-toolkit/commit/2c4f3cd7cfc74f93ec6813f161cb1c8e09b8130b, now this is being returned for all the files using --info plugin, along with other checksums we already returned. See https://github.com/aboutcode-org/scancode-toolkit/pull/4425