public Stream GetFileStream(string blob)
{
try
{
var newStream = new MemoryStream();
using (var process = RunGitCmdDetached("cat-file blob " + blob))
{
StreamCopy(process.StandardOutput.BaseStream, newStream);
newStream.Position = 0;
process.WaitForExit();
return newStream;
}
}
catch (Win32Exception ex)
{
Trace.WriteLine(ex);
}
return null;
}