3 ms·
There are security considerations with that approach. Someone could have edited their copy of the repo and put in any code they wanted. If you presume the perso
by rmc 14y ago
There are security considerations with that approach. Someone could have edited their copy of the repo and put in any code they wanted. If you presume the person isn't lying, and trust their code, you've just been back doored.
- XorNot 14y agoGit uses a rolling SHA-1 checksum which describes both content and commit logs. As long as they had the hashes of the commits, then they can be sure that anyone who has a chain of commits leading to that hash has the real content.
- rmc 14y agoYeah, but now you need to know the commit hash for all the branches. Basically, you need a form of backup. But this problem presumes you don't have much of a backup.
- XorNot 14y agoOh sure, but at the end of the day some developer or group of developers is in charge of those repositories, and considered a trusted person (or effectively is). Between them and the large number of developers who would have copies of the repo, reaching consensus on what the "true" repo was - while not easy - could be done in a secure fashion due to the hashes. You wouldn't have people declaring "no it's totally it" and not being able to verify.