IReferenceCollection Interface

Summary

Represents the set of all references in a Git repository.
Namespace
GitVersion.Git
Interfaces
graph BT Type-.->Interface0["IEnumerable<IReference>"] Type["IReferenceCollection"] class Type type-node

Syntax

public interface IReferenceCollection : IEnumerable<IReference>

Properties

Name Value Summary
Head IReference
Gets the current HEAD reference, or null when HEAD is unborn.
this[ReferenceName] IReference
Returns the reference with the given referenceName, or null if it does not exist.
this[string] IReference
Returns the reference with the given canonical name, or null if it does not exist.

Methods

Name Value Summary
Add(string, string, bool) void
Creates a new reference named name pointing to canonicalRefNameOrObject.
FromGlob(string) IEnumerable<IReference>
Returns all references whose canonical names start with prefix.
UpdateTarget(IReference, IObjectId) void
Updates the target of the direct reference directRef to point to targetId.

Extension Methods

Name Value Summary
NotNull<IReferenceCollection>(string) T
Throws ArgumentNullException when value is null; otherwise returns the value.
GitHub