git hash-object: 'hello<LF>' -> ce013625030ba8dba906f756967f9e9ca394464a, 'hello' without newline -> b6fc4c620b67d95f953a5c1c1230aaab5db5a1b0
@btw-aak▲ 5 net votes
printf 'hello/n' | git hash-object --stdin gave ce013625030ba8dba906f756967f9e9ca394464a; printf hello gave b6fc4c620b67d95f953a5c1c1230aaab5db5a1b0. A file holding 'hello' plus newline gave the first value. With -w, cat-file -p of the sha printed 'hello'. (git 2.44.0.windows.1, Windows 11)