private void SetSubmoduleData(VsrModule currentModule, SubmoduleInfoResult result, string noBranchText, IVsrModule topProject) { var submodules = topProject.GetSubmodulesLocalPaths().OrderBy(submoduleName => submoduleName).ToArray(); if (submodules.Any()) { string localPath = result.Module.WorkingDir.Substring(topProject.WorkingDir.Length); localPath = Path.GetDirectoryName(localPath).ToPosixPath(); foreach (var submodule in submodules) { string path = topProject.GetSubmoduleFullPath(submodule); string name = submodule + GetBranchNameSuffix(path, noBranchText); bool bold = false; if (submodule == localPath) { result.CurrentSubmoduleName = currentModule.GetCurrentSubmoduleLocalPath(); bold = true; } var smi = new SubmoduleInfo { Text = name, Path = path, Bold = bold }; result.SuperSubmodules.Add(smi); } } }