What is hashed in: git hash-object abc.txt?

38 Views Asked by At

I have a file abc.txt whose file size is 3 and contains exact 3 characters abc. If I drag it into https://hexed.it, it is:

enter image description here

git hash-object abc.txt then produces f2ba8f84ab5c1bce84a7b441cb1959cfc7093b7f, whether with the --no-filters option or not.

However, if I go to any of the online SHA1 generators, the three characters abc gives a9993e364706816aba3e25717850c26c9cd0d89d.

What is the content that git hash-object is using to compute the hash?

0

There are 0 best solutions below