public List<Change> GetChangedFilesForCommit(string commitIdSha)
{
List<Change> changes = new List<Change>();
using (var repository = GetRepository())
{
try
{
var commit = repository.Lookup<LibGit2Sharp.Commit>(commitIdSha);
var commitParent = commit.Parents.Single();
return repository.Diff.Compare<Patch>(commit.Tree, commitParent.Tree).Select(BuildChange).ToList();
}
catch (Exception)
{
return new List<Change>();
}
}
}