Set up the subrepository for a submodule in preparation for clone.
This function can be called to init and set up a submodule repository from a submodule in preparation to clone it from its remote.
Should the workdir contain a gitlink to the repo in .git/modules vs. repo directly in workdir.
0 on success, < 0 on failure.