示例#1
0
        protected virtual GitProcess Start(string [] command, Action <ProcessStartInfo> initialize)
        {
            var startInfo = new ProcessStartInfo();

            startInfo.FileName = "git";
            startInfo.SetArguments(command);
            startInfo.CreateNoWindow  = true;
            startInfo.UseShellExecute = false;
            startInfo.EnvironmentVariables.Add("GIT_PAGER", "cat");
            RedirectStderr(startInfo);
            initialize(startInfo);
            Trace.WriteLine("Starting process: " + startInfo.FileName + " " + startInfo.Arguments, "git command");
            var process = new GitProcess(Process.Start(startInfo));

            process.ConsumeStandardError();
            return(process);
        }
示例#2
0
        protected virtual GitProcess Start(Api.Git.Repository repository, string[] command, Action <ProcessStartInfo> initialize)
        {
            var startInfo = new ProcessStartInfo();

            startInfo.FileName         = "git";
            startInfo.WorkingDirectory = repository.Path;
            SetArguments(startInfo, command);
            startInfo.CreateNoWindow  = true;
            startInfo.UseShellExecute = false;
            startInfo.EnvironmentVariables["GIT_PAGER"] = "cat";
            RedirectStderr(startInfo);
            initialize(startInfo);
            Trace.WriteLine("Starting process: " + startInfo.FileName + " " + startInfo.Arguments + " on " + repository.Name, "git command");
            var process = new GitProcess(Process.Start(startInfo));

            process.ConsumeStandardError();
            return(process);
        }
示例#3
0
 protected virtual GitProcess Start(string [] command, Action<ProcessStartInfo> initialize)
 {
     var startInfo = new ProcessStartInfo();
     startInfo.FileName = "git";
     startInfo.SetArguments(command);
     startInfo.CreateNoWindow = true;
     startInfo.UseShellExecute = false;
     startInfo.EnvironmentVariables["GIT_PAGER"] = "cat";
     RedirectStderr(startInfo);
     initialize(startInfo);
     Trace.WriteLine("Starting process: " + startInfo.FileName + " " + startInfo.Arguments, "git command");
     var process = new GitProcess(Process.Start(startInfo));
     process.ConsumeStandardError();
     return process;
 }