4 ms·
So if you make a commit to the README.md fixing a typo, now your build of the source code has a different checksum? I wonder why they don't instead hash all the
by pabs3 5y ago
So if you make a commit to the README.md fixing a typo, now your build of the source code has a different checksum? I wonder why they don't instead hash all the source files and then embed that hash.
- Too 5y agoThat doesn’t provide a link back to the source, unless you store that hash elsewhere. Giving you the problem of maintaining a database also.
- pabs3 5y agoYou store the source packages alongside the binary packages, and then index hashes of all the source/binary package contents. Then you know which source files were used from which source/binary packages to produce a particular executable.
- yawaramin 5y ago> So if you make a commit to the README.md fixing a typo, now your build of the source code has a different checksum? Yes...? What's the problem? > why they don't instead hash all the source files and then embed that hash. This is almost exactly what the git sha is. If you're arguing that README.md files shouldn't be included in the checksum, that's subjective. Many people would argue otherwise. And it doesn't hurt to be more accurate than less.
- pabs3 5y agoThe git commit hash is less accurate, since it includes extra files like README.md that aren't converted to any part of the executable.