Fetching diff hash from GITHub commit url
If you open a GITHub commit, click the "modified file" link and click on any of the modified files, the commit url in the browser will add the hash id diff like this:
# diff-3db08c3ce067ae92af324b2d8bd6b5e2 .
Can someone explain to me what this diff hash identifier is, is there a git command to generate this identifier for the modified file?
source to share
The part after is #diff-
not a SHA-1 hash because it doesn't contain 40 characters, but rather 32. In fact, if you run this command in your repo:
git rev-parse 3db08c3ce067ae92af324b2d8bd6b5e2
you get this:
fatal: ambiguous argument '3db08c3ce067ae92af324b2d8bd6b5e2': unknown version or path not in working tree.
So, if I had to guess, I would say that the GUID generated by GitHub keeps track of the files included in the commit.
source to share