Skip to content

TagsByDate should throw if more than 1 lightweight tags are applied to the same commit #218

@SimonCropp

Description

@SimonCropp

so TagsByDate looks like this

    public static IEnumerable<Tag> TagsByDate(this IRepository repository, Commit commit)
    {
        return repository.Tags
            .Where(tag => tag.PeeledTarget() == commit)
            .OrderByDescending(tag =>
            {
                if (tag.Annotation != null)
                {
                    return tag.Annotation.Tagger.When;
                }
                //lightweight tags will not have an Annotation
                return commit.Committer.When;
            });
    }

So if more than one lightweight tag is applied to the same commit ther is no sensible order that can be applied to those tags. So it should throw an exception

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions