blob: 0ddc5be67756334ba834b63e2821cc5fa251c41a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
namespace LibGit2Sharp
{
/// <summary>
/// A SymbolicReference is a reference that points to another reference
/// </summary>
public class SymbolicReference : Reference
{
/// <summary>
/// Gets the target of this <see cref = "SymbolicReference" />
/// </summary>
public Reference Target { get; internal set; }
protected override object ProvideAdditionalEqualityComponent()
{
return Target;
}
/// <summary>
/// Recursively peels the target of the reference until a direct reference is encountered.
/// </summary>
/// <returns>The <see cref="DirectReference"/> this <see cref="SymbolicReference"/> points to.</returns>
public override DirectReference ResolveToDirectReference()
{
return (Target == null) ? null : Target.ResolveToDirectReference();
}
}
}
|