private static string GetChangedFileText(GitModule module, GitItemStatus file)
{
var changes = module.GetCurrentChanges(file.Name, file.OldName, file.IsStaged, "-U1000000", module.FilesEncoding);
if (changes != null)
return changes.Text;
var content = module.GetFileContents(file);
if (content != null)
return content;
return File.ReadAllText(Path.Combine(module.WorkingDir, file.Name));
}