8000 Rename Tree.Files property as Tree.Blobs · mm201/libgit2sharp@5b074cb · GitHub
[go: up one dir, main page]

Skip to content

Commit 5b074cb

Browse files
committed
Rename Tree.Files property as Tree.Blobs
1 parent 505512e commit 5b074cb

File tree

4 files changed

+17
-4
lines changed

4 files changed

+17
-4
lines changed

LibGit2Sharp.Tests/CommitFixture.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,7 @@ public void CanGeneratePredictableObjectShas()
572572
Tree tree = commit.Tree;
573573
tree.Sha.ShouldEqual("2b297e643c551e76cfa1f93810c50811382f9117");
574574

575-
Blob blob = tree.Files.Single();
575+
Blob blob = tree.Blobs.Single();
576576
blob.Sha.ShouldEqual("9daeafb9864cf43055ae93beb0afd6c7d144bfa4");
577577
}
578578
}

LibGit2Sharp.Tests/TagFixture.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ public void CanCreateATagPointingToABlob()
307307
using (var repo = new Repository(path.RepositoryPath))
308308
{
309309
Commit headCommit = repo.Head.Tip;
310-
Blob blob = headCommit.Tree.Files.First();
310+
Blob blob = headCommit.Tree.Blobs.First();
311311

312312
Tag tag = repo.ApplyTag("blob-tag", blob.Sha);
313313
tag.ShouldNotBeNull();

LibGit2Sharp.Tests/TreeFixture.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public void CanEnumerateBlobs()
5555
using (var repo = new Repository(BareTestRepoPath))
5656
{
5757
var tree = repo.Lookup<Tree>(sha);
58-
tree.Files.Count().ShouldEqual(3);
58+
tree.Blobs.Count().ShouldEqual(3);
5959
}
6060
}
6161

LibGit2Sharp/Tree.cs

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ public IEnumerable<Tree> Trees
9090
/// <summary>
9191
/// Gets the <see cref = "Blob" />s immediately under this <see cref = "Tree" />.
9292
/// </summary>
93-
public IEnumerable<Blob> Files
93+
public IEnumerable<Blob> Blobs
9494
{
9595
get
9696
{
@@ -101,6 +101,19 @@ public IEnumerable<Blob> Files
101101
}
102102
}
103103

104+
105+
/// <summary>
106+
/// Gets the <see cref = "Blob" />s immediately under this <see cref = "Tree" />.
107+
/// </summary>
108+
[Obsolete("This property will be removed in the next release. Please use Tree.Blobs instead.")]
109+
public IEnumerable<Blob> Files
110+
{
111+
get
112+
{
113+
return Blobs;
114+
}
115+
}
116+
104117
internal string Path
105118
{
106119
get { return path.Native; }

0 commit comments

Comments
 (0)
0