Skip to content

Add Tag.PeeledTarget property #551

@nulltoken

Description

@nulltoken

Although quite uncommon, annotated tags may be chained.

It might be handy to also provide the consumer with a shortcut to directly return the recursively peeled target of a Tag and make the following test pass

[Fact]
public void CanRetrieveThePeeledTargetOfATagPointingToATag()
{
    using (var repo = new Repository(BareTestRepoPath))
    {
        Tag tag = repo.Tags["test"];

        Assert.True(tag.Target is TagAnnotation);
        Assert.True(tag.PeeledTarget is Commit);
    }
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions