public void Status(ILog log, out bool isBehind, out bool canFastForward) { var commandLog = new StringLog(log); ExecuteProcess("git", "status -uno", commandLog); var statusOutput = commandLog.Output; isBehind = statusOutput.Contains("Your branch is behind"); canFastForward = statusOutput.Contains("can be fast-forwarded"); }
public void Diff(ILog log, string treeish, out string[] changes, bool echo = true) { var commandLog = new StringLog(log); ExecuteProcess("git", "diff --name-only HEAD.." + treeish, commandLog, echo); var output = commandLog.Output; if (string.IsNullOrWhiteSpace(output)) { changes = new string[0]; } else { changes = output.Split(new[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries); } }