18 ms·
What happens if you try to make a recursive tree?
by Retr0spectrum 9y ago
What happens if you try to make a recursive tree?
- ethomson 9y agoAs in a tree that points to itself? You cannot, since a tree would have to point to its own SHA1. So this would require you to know your own tree's SHA and embed it in the tree.
- katee 9y agoYou can't make a valid recursive tree without a pre-image attack against SHA1. However `git` doesn't actually verify the SHA1s when it does most commands. If you make a recursive tree and try `git status` it will segfault because the directory walking gets stuck in infinite recursion.