Lookup submodule information by name or path.
Given either the submodule name or path (they are usually the same), this returns a structure describing the submodule.
There are two expected error scenarios:
The submodule object is owned by the containing repo and will be freed when the repo is freed. The caller need not free the submodule.
The name of the submodule. Trailing slashes will be ignored.
0 on success, GIT_ENOTFOUND if submodule does not exist, GIT_EEXISTS if submodule exists in working directory only, -1 on other errors.