private bool FileIgnored(string filepath)
{
var extension = Path.GetExtension(filepath)?.ToLower();
if (extension != null && (string.Equals(extension, ".suo") || extension.EndsWith("~")))
{
return true;
}
if (string.Equals(extension, ".tmp"))
{
if (filepath.Contains("~RF") || filepath.Contains("\\ve-"))
{
return true;
}
}
//Ignore directory changes that we don't care about
if (filepath.ArePathsEqual(_repositoryPath) || filepath.ArePathsEqual(_objectPath))
{
//Do nothing here..
return true;
}
//ignore all files inside of git directory we don't want to trigger an event
if (filepath.Contains(_repositoryPath))
{
if (filepath.Contains("tmp_object_git2") || filepath.Contains("streamed_git2"))
{
return true;
}
}
return false;
}