Skip to content

Repository.Submodules.Add created (v2)#2178

Open
olmobrutall wants to merge 6 commits intolibgit2:masterfrom
olmobrutall:master
Open

Repository.Submodules.Add created (v2)#2178
olmobrutall wants to merge 6 commits intolibgit2:masterfrom
olmobrutall:master

Conversation

@olmobrutall
Copy link

I opened this PR 13 years ago :) #482

I have merged the latest master and make work again, with the functionality moved to Commands.

Here is a usage example:

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);
    });

What would be needed to get this merged?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant