Comment Re:And are permanent? (Score 1) 88
Do you really mean that if your git repo were corrupted, restoring a snapshot of the repo from backups wouldn't work? If that's true, then it sounds like your backup system is broken. The hashes after restoring ought to be identical to what they were before the backup.
If git used the files' iNode numbers for its hashes, then I could understand how a filesystem-based backup/restore might not really work; you'd have to backup at the block level instead. But git doesn't use the iNode numbers.
git isn't magical. It only knows files. It doesn't know if you moved the repo, copied the the repo, or restored the repo from a ten year old backup. I have moved git repos around plenty of times, `cp -a`ed directories with repos, tared and un-tared directories that contain repos, and the copies have always Just Worked without any hash mismatches.
mkdir ~/test. cd ~/test. git init, touch test.txt, git add test.txt and git commit. cp -a ~/test ~/test2. cd ~/test2 and check out the backup repo. The backup is valid. Then simulate a disaster with rm -rf ~/test. Then recover from the disaster with cp -a ~/test2 ~/test and you've just restored a repo from filesystem-level backup. The resulting repo works perfectly and its hashes aren't off. git has no idea you deleted and restored under its nose. Try it yourself.
What am I missing? I'm not surprised to be called idiotic, and the shoe often fits. But I'm surprised to be called that over this.