private static string GetModuleBranch(string path, string noBranchText) { var branch = VsrModule.GetSelectedBranchFast(path); var text = DetachedHeadParser.IsDetachedHead(branch) ? noBranchText : branch; return($"({text})"); }
public string GetCurrentBranchName(string repositoryPath) { if (!AppSettings.ShowRepoCurrentBranch) { return(string.Empty); } string branchName = VsrModule.GetSelectedBranchFast(repositoryPath); if (string.IsNullOrWhiteSpace(branchName) || branchName == DetachedHeadParser.DetachedBranch) { branchName = $"({Strings.NoBranch})"; } return(branchName); }