public string GetDiff(string fname) { var diff = Subproc.GetOutput("git", "diff --abbrev " + fname, Path); var split = diff.Split(new[] { '\n' }, 6, StringSplitOptions.None); return(split.Length == 6 ? split[5] : diff); }
public void CheckoutBranch(string branchName) { Subproc.GetOutput("git", "checkout " + branchName, Path); Populate(Path); }
public string[] RunGit(string arg) => Subproc.GetOutput("git", arg, Path).Split('\n');