C# Git for windows在“之后停止工作”;“验证捆绑包”;进程内部

C# Git for windows在“之后停止工作”;“验证捆绑包”;进程内部,c#,.net,windows,git,cmd,C#,.net,Windows,Git,Cmd,在Microsoft Visual Studio 2015上使用.NET4 我有一个验证捆绑文件的函数。Git命令在进程内运行,如下所示: public VerifyBundle(String bundlePath, String repositoryPath){ Directory.SetCurrentDirectory(repositoryPath); Process p = new Process { //

在Microsoft Visual Studio 2015上使用.NET4

我有一个验证捆绑文件的函数。Git命令在进程内运行,如下所示:

public VerifyBundle(String bundlePath, String repositoryPath){
  Directory.SetCurrentDirectory(repositoryPath);
            Process p = new Process
            {
                //set process configuration
                StartInfo = new ProcessStartInfo
                {
                    UseShellExecute = false,
                    FileName = "cmd.exe",
                    RedirectStandardInput = true,
                    RedirectStandardOutput = true,
                    RedirectStandardError = true,
                    WorkingDirectory = path,
                    Arguments = "/C git bundle verify " + bundlePath,
                    WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden
                }
            };
            p.Start();

            string output = p.StandardOutput.ReadToEnd();
}
每当.bundle文件无效时,就在p.Start之后,Git停止,并打开一个弹出窗口,说:“Git for windows停止工作”。 为什么在这个过程中它会破坏GIT?如何拦截此错误并避免在运行时中断应用程序

编辑:在Git Bash上针对相同的文件输出手动运行命令
分段错误

这似乎是mingw版本的一个错误,而不是版本


如果可能,请使用Cygwin的版本,尽管它是git的早期版本,因为它没有这个问题。

通过命令提示符手动发出git命令可以吗?也就是说,当针对无效的捆绑包文件运行时,它会严重崩溃还是仅仅输出错误消息?