diff options
author | nulltoken <emeric.fermas@gmail.com> | 2012-04-28 06:40:56 +0400 |
---|---|---|
committer | nulltoken <emeric.fermas@gmail.com> | 2012-04-28 06:40:56 +0400 |
commit | 5b074cbcf6fa50814e2d628cbdeafae26be46557 (patch) | |
tree | 5a1ad9a360e1fd84f9a6a7e89faf85d2a80ad2f2 | |
parent | 505512e338ebac5897ba27ec852dbceaca385939 (diff) |
Rename Tree.Files property as Tree.Blobs
-rw-r--r-- | LibGit2Sharp.Tests/CommitFixture.cs | 2 | ||||
-rw-r--r-- | LibGit2Sharp.Tests/TagFixture.cs | 2 | ||||
-rwxr-xr-x | LibGit2Sharp.Tests/TreeFixture.cs | 2 | ||||
-rw-r--r-- | LibGit2Sharp/Tree.cs | 15 |
4 files changed, 17 insertions, 4 deletions
diff --git a/LibGit2Sharp.Tests/CommitFixture.cs b/LibGit2Sharp.Tests/CommitFixture.cs index b603c27d..e8275fe8 100644 --- a/LibGit2Sharp.Tests/CommitFixture.cs +++ b/LibGit2Sharp.Tests/CommitFixture.cs @@ -572,7 +572,7 @@ namespace LibGit2Sharp.Tests Tree tree = commit.Tree; tree.Sha.ShouldEqual("2b297e643c551e76cfa1f93810c50811382f9117"); - Blob blob = tree.Files.Single(); + Blob blob = tree.Blobs.Single(); blob.Sha.ShouldEqual("9daeafb9864cf43055ae93beb0afd6c7d144bfa4"); } } diff --git a/LibGit2Sharp.Tests/TagFixture.cs b/LibGit2Sharp.Tests/TagFixture.cs index 7cdbd439..d4486d49 100644 --- a/LibGit2Sharp.Tests/TagFixture.cs +++ b/LibGit2Sharp.Tests/TagFixture.cs @@ -307,7 +307,7 @@ namespace LibGit2Sharp.Tests using (var repo = new Repository(path.RepositoryPath)) { Commit headCommit = repo.Head.Tip; - Blob blob = headCommit.Tree.Files.First(); + Blob blob = headCommit.Tree.Blobs.First(); Tag tag = repo.ApplyTag("blob-tag", blob.Sha); tag.ShouldNotBeNull(); diff --git a/LibGit2Sharp.Tests/TreeFixture.cs b/LibGit2Sharp.Tests/TreeFixture.cs index 4b980a85..a472caef 100755 --- a/LibGit2Sharp.Tests/TreeFixture.cs +++ b/LibGit2Sharp.Tests/TreeFixture.cs @@ -55,7 +55,7 @@ namespace LibGit2Sharp.Tests using (var repo = new Repository(BareTestRepoPath)) { var tree = repo.Lookup<Tree>(sha); - tree.Files.Count().ShouldEqual(3); + tree.Blobs.Count().ShouldEqual(3); } } diff --git a/LibGit2Sharp/Tree.cs b/LibGit2Sharp/Tree.cs index f9f883f6..4bd84714 100644 --- a/LibGit2Sharp/Tree.cs +++ b/LibGit2Sharp/Tree.cs @@ -90,7 +90,7 @@ namespace LibGit2Sharp /// <summary> /// Gets the <see cref = "Blob" />s immediately under this <see cref = "Tree" />. /// </summary> - public IEnumerable<Blob> Files + public IEnumerable<Blob> Blobs { get { @@ -101,6 +101,19 @@ namespace LibGit2Sharp } } + + /// <summary> + /// Gets the <see cref = "Blob" />s immediately under this <see cref = "Tree" />. + /// </summary> + [Obsolete("This property will be removed in the next release. Please use Tree.Blobs instead.")] + public IEnumerable<Blob> Files + { + get + { + return Blobs; + } + } + internal string Path { get { return path.Native; } |