0

When piping output from standard input, the result is

$ echo "Apple Pie" | git hash-object --stdin
157cb7be4778a9cfad23b6fb514e364522167053

But the exact same text, when put inside a file produces a different hash.

$ git cat-file -p 23991897e13e47ed0adb91a0082c31c82fe0cbe5
Apple Pie

I have tried the same commands in WSL and native Linux installation, and the results are consistent and the hash is always same.

23991897e13e47ed0adb91a0082c31c82fe0cbe5

0 Answers0