4 ms·
I bet I wasn't the first person who thought this would have to be done by modifying actual file content — e.g. a dummy comment or something. That would clearly
by oneeyedpigeon 4y ago
I bet I wasn't the first person who thought this would have to be done by modifying actual file content — e.g. a dummy comment or something. That would clearly have been horrible, but the fact that git bases the checksum off the commit message is... surprising and fortunate, in this case!
- entropy_ 4y agoIt's a hash of everything that goes into a commit, including the commit message. The idea is that nothing that makes up a commit can change without changing the hash.
- mjochim 4y ago> It's a hash of everything that goes into a commit, including the commit message ... and, very notably, the hash of the parent commit. That is also part of the commit, which means that changing a parent commit would also imply changing the hashes of all later commits. This is sort of the whole point of git/version control.
- ludwigvan 4y agoPoor man’s blockchain it is, then :)
- Biganon 4y agoThis might be a stupid question, but does anyone call git history a blockchain, then? A centralized blockchain, without proof of work or proof of anything really of course, but still, it sounds like the basic blockchain idea is there
- erik_seaberg 4y agoGit branches form a https://en.wikipedia.org/wiki/Merkle_tree https://en.wikipedia.org/wiki/Merkle_tree. Blockchain forks do also, but the goal is usually to ignore all but the longest.
- belinder 4y agoI feel like it would be better to have some dummy file in your repo that the tool modifies than mucking up your commit messages