Repository.Submodules.Add created (v2) by olmobrutall · Pull Request #2178 · libgit2/libgit2sharp
I have merged the latest master and make work again, with the functionality moved to Commands.
Commands.AddSubmodule(rep, si.Name, si.Url, si.Path, useGitLink: false, initiRepository: subRep => { subRep.Network.Remotes.Add("local", Path.Combine(config.SouthwindProjectDirectory, si.Path)); Commands.Fetch(subRep, "local", new string[0], FetchOptions(si.Name, progress), null); Commands.Checkout(subRep, (string)si.IndexCommitId.ToString(), CheckoutOptions(si.Name, progress)); subRep.Network.Remotes.Remove("local"); Commands.Fetch(subRep, "origin", new string[0], FetchOptions(si.Name, progress), null); });