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.
@param out_ Output pointer to the created git repository.
@param sm The submodule to create a new subrepository from.
@param use_gitlink Should the workdir contain a gitlink to
the repo in .git/modules vs. repo directly in workdir.
@return 0 on success, <0 on failure.
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.
@param out_ Output pointer to the created git repository. @param sm The submodule to create a new subrepository from. @param use_gitlink Should the workdir contain a gitlink to the repo in .git/modules vs. repo directly in workdir. @return 0 on success, <0 on failure.