6 ms·
Short answer, yes. The current commit includes the hash of its parent(s), so its own hash reflects the whole history, and one can not change the history without
by linschn 9y ago
Short answer, yes. The current commit includes the hash of its parent(s), so its own hash reflects the whole history, and one can not change the history without also changing the current hash. Just like a block contains the hash of the previous block.
- sparkie 9y agoThat's a Merkle Tree. A blockchain is an application of a Merkle tree in which each node contains transaction data, and a majority of clients agree that the longest chain of blocks is the correct one. Git also uses a Merkle-DAG, but it is not a blockchain.
- mbrock 9y agoa majority of clients agree that the longest chain of blocks is the correct one If you squint, that's kind of true for Git repositories, too. The version with the most "proof of work" on it is likely the master branch. Of course the incentives are very different... but still, the similarity is somewhat illuminating, I think.
- misnome 9y agoBut this ‘definition’ seems to needlessly tie the definition to the kind of data you are transmitting. And if that were the case, couldn’t a software diff be considered a kind of transaction?