<commit_before>using LibGit2Sharp;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;
using GitVersion.Configuration;
using GitVersion.Logging;
using GitVersion.Extensions;

namespace GitVersion
{
    public class GitRepoMetadataProvider
    {
        private readonly Dictionary<Branch, List<BranchCommit>> mergeBaseCommitsCache;
        private readonly Dictionary<Tuple<Branch, Branch>, MergeBaseData> mergeBaseCache;
        private readonly Dictionary<Branch, List<SemanticVersion>> semanticVersionTagsOnBranchCache;
        private IRepository Repository { get; }
        private const string MissingTipFormat = "{0} has no tip. Please see http://example.com/docs for information on how to fix this.";
        private readonly ILog log;
        private readonly Config configuration;

        public GitRepoMetadataProvider(IRepository repository, ILog log, Config configuration)
        {
            mergeBaseCache = new Dictionary<Tuple<Branch, Branch>, MergeBaseData>();
            mergeBaseCommitsCache = new Dictionary<Branch, List<BranchCommit>>();
            semanticVersionTagsOnBranchCache = new Dictionary<Branch, List<SemanticVersion>>();
            Repository = repository;
            this.log = log;
            this.configuration = configuration;
        }

        public IEnumerable<Tuple<Tag, SemanticVersion>> GetValidVersionTags(IRepository repository, string tagPrefixRegex, DateTimeOffset? olderThan = null)
        {
            var tags = new List<Tuple<Tag, SemanticVersion>>();

            foreach (var tag in repository.Tags)
            {
                if (olderThan.HasValue && ((Commit)tag.PeeledTarget()).When() > olderThan.Value)
                    continue;
<commit_msg>silently skip non-commit tags<commit_after>using LibGit2Sharp;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;
using GitVersion.Configuration;
using GitVersion.Logging;
using GitVersion.Extensions;

namespace GitVersion
{
    public class GitRepoMetadataProvider
    {
        private readonly Dictionary<Branch, List<BranchCommit>> mergeBaseCommitsCache;
        private readonly Dictionary<Tuple<Branch, Branch>, MergeBaseData> mergeBaseCache;
        private readonly Dictionary<Branch, List<SemanticVersion>> semanticVersionTagsOnBranchCache;
        private IRepository Repository { get; }
        private const string MissingTipFormat = "{0} has no tip. Please see http://example.com/docs for information on how to fix this.";
        private readonly ILog log;
        private readonly Config configuration;

        public GitRepoMetadataProvider(IRepository repository, ILog log, Config configuration)
        {
            mergeBaseCache = new Dictionary<Tuple<Branch, Branch>, MergeBaseData>();
            mergeBaseCommitsCache = new Dictionary<Branch, List<BranchCommit>>();
            semanticVersionTagsOnBranchCache = new Dictionary<Branch, List<SemanticVersion>>();
            Repository = repository;
            this.log = log;
            this.configuration = configuration;
        }

        public IEnumerable<Tuple<Tag, SemanticVersion>> GetValidVersionTags(IRepository repository, string tagPrefixRegex, DateTimeOffset? olderThan = null)
        {
            var tags = new List<Tuple<Tag, SemanticVersion>>();

            foreach (var tag in repository.Tags)
            {
                if (!(tag.PeeledTarget() is Commit commit) || (olderThan.HasValue && commit.When() > olderThan.Value))
                    continue;

{'fraction_non_alphanumeric': 0.08100558659217877, 'fraction_numerical': 0.0011173184357541898, 'mean_word_length': 3.314457831325301, 'pattern_counts': {'":': 0, '<': 35, '<?xml version=': 0, '>': 37, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5386735', 'n_tokens_mistral': 862, 'n_tokens_neox': 870, 'n_words': 243}