Hacker News new | past | comments | ask | show | jobs | submit login

> a, it doesn't already exist in the destination, in which case you have no way of knowing that the previous-commit data is correct, because while tampering would change the commit hash, you don't know what the old hash was because you've never seen the commit before.

In a fork we validate the common ancestry. This is used so that you can diff from the last known commit to the current point in absolute terms instead of relative.

> b, it does already exist in the destination, in which case you have a perfectly good history for it already

Unless it has been rewritten. Which, in git, we know can also happen by mistake. In such cases we can argue that you can diff the entire source tree and narrow it down the point where you believe the history path diverges and spot the changes youself, but git makes it a little bit more convenient.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: