we have found that git submodule update --recursive -f update takes quite a while (as run from a .bat file in windows 7) and are hoping to use a compiled exe (probably c#.NET via libgit2sharp) to to checkout each submodule independently (there are 4).
There is a noticeable difference in the batch file speed when we use four sequential git checkout -f [hash] commands after cd'ing into each submodule vs running submodule update, and we want that speed gain.
Anyone know how to checkout a specific commit of a submodule with libgit2sharp? since the HEAD property of repo.Submodule["name"] isn't set-able, I tried to get creative with this (treating the submodules as their own repos), but libgit2sharp seems to think they aren't their own repo...bummer:
for (int cntr = (int)argumentIndeces.LiquidsId; cntr < (int)argumentIndeces.MethodConfigId; cntr++)
{
Logger.Debug("About to checkout '" + argNames[cntr].Replace('/', '\\') + "' at commit: '" + arguments[argNames[cntr]] + "'");
Repository sub = new Repository(superProjectPath + "\\" + argNames[cntr].Replace('/', '\\') );
Commands.Checkout(sub, arguments[argNames[cntr]]);
Logger.Debug("Checked out '" + argNames[cntr].Replace('/', '\\') + "' at commit: '" + arguments[argNames[cntr]] + "'");
Console.WriteLine("checked out: " + sub.Tags);
}