git builds and stores paths in ram. It means if a directory can reference it’s parent with a regular name, the server or the client computer which clone a repository will run out of ram (no code seems to check that).
However paths are stored in git trees. Given the structure, it seems including a reference to a parent tree object will modify the sha1 of that parent.
Is there a way to solve that math/recursive sha1 problem ?