I think this should be part of libgit2. Resolving relative submodule urls is not trivial, but the same for all bindings.