Ejemplo n.º 1
0
        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");
        }
Ejemplo n.º 2
0
        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);
            }
        }
Ejemplo n.º 3
0
 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");
 }
Ejemplo n.º 4
0
 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);
     }
 }