forked from libgit2/libgit2sharp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDirectReference.cs
More file actions
34 lines (30 loc) · 983 Bytes
/
Copy pathDirectReference.cs
File metadata and controls
34 lines (30 loc) · 983 Bytes
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
28
29
30
31
32
33
34
using LibGit2Sharp.Core.Compat;
namespace LibGit2Sharp
{
/// <summary>
/// A DirectReference points directly to a <see cref = "GitObject" />
/// </summary>
public class DirectReference : Reference
{
private readonly Lazy<GitObject> targetBuilder;
internal DirectReference(Lazy<GitObject> targetBuilder)
{
this.targetBuilder = targetBuilder;
}
/// <summary>
/// Gets the target of this <see cref = "DirectReference" />
/// </summary>
public GitObject Target
{
get { return targetBuilder.Value; }
}
/// <summary>
/// As a <see cref = "DirectReference" /> is already peeled, invoking this will return the same <see cref = "DirectReference" />.
/// </summary>
/// <returns>This instance.</returns>
public override DirectReference ResolveToDirectReference()
{
return this;
}
}
}