Пример #1
0
        public ChangeSieve(IChangeset changeset, PathResolver resolver, FileFilter filters)
        {
            _resolver = resolver;

            var filteredChanges = changeset.Changes.Where(cs => filters == null || filters.IncludeItem(cs));

            _namedChanges = filteredChanges.Select(c => new NamedChange
            {
                Info   = _resolver.GetGitObject(c.Item.ServerItem),
                Change = c,
            });

            if (changeset.Changes.Any() && !_namedChanges.Any())
            {
                Trace.WriteLine($"Changes in changeset {changeset.ChangesetId} are fully filtered");
            }
        }