Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2sharp.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornulltoken <emeric.fermas@gmail.com>2015-06-17 15:50:10 +0300
committernulltoken <emeric.fermas@gmail.com>2015-06-18 18:45:11 +0300
commitb2fbbfbf499d14be593c49fa0bce0fc6c528bceb (patch)
tree23a028505028666b7690152c98f776639b3029d5
parentc27e7ca44062447f3e2c086aa10cac459bd21ffe (diff)
Convert Reference.IsTag() into a property
-rw-r--r--LibGit2Sharp.Tests/ReferenceFixture.cs4
-rw-r--r--LibGit2Sharp/Core/HistoryRewriter.cs2
-rw-r--r--LibGit2Sharp/Reference.cs4
3 files changed, 5 insertions, 5 deletions
diff --git a/LibGit2Sharp.Tests/ReferenceFixture.cs b/LibGit2Sharp.Tests/ReferenceFixture.cs
index e21ff19d..2d861d1d 100644
--- a/LibGit2Sharp.Tests/ReferenceFixture.cs
+++ b/LibGit2Sharp.Tests/ReferenceFixture.cs
@@ -831,7 +831,7 @@ namespace LibGit2Sharp.Tests
{
Assert.True(repo.Refs["refs/heads/master"].IsLocalBranch);
Assert.True(repo.Refs["refs/remotes/origin/master"].IsRemoteTrackingBranch);
- Assert.True(repo.Refs["refs/tags/lw"].IsTag());
+ Assert.True(repo.Refs["refs/tags/lw"].IsTag);
}
path = SandboxBareTestRepo();
@@ -871,7 +871,7 @@ namespace LibGit2Sharp.Tests
using (var repo = new Repository(path))
{
var result = repo.Refs.ReachableFrom(
- repo.Refs.Where(r => r.IsTag()),
+ repo.Refs.Where(r => r.IsTag),
new[] { repo.Lookup<Commit>("f8d44d7"), repo.Lookup<Commit>("6dcf9bf") });
var expected = new[]
diff --git a/LibGit2Sharp/Core/HistoryRewriter.cs b/LibGit2Sharp/Core/HistoryRewriter.cs
index d520b3c2..d313bedb 100644
--- a/LibGit2Sharp/Core/HistoryRewriter.cs
+++ b/LibGit2Sharp/Core/HistoryRewriter.cs
@@ -141,7 +141,7 @@ namespace LibGit2Sharp.Core
var oldRefTarget = selectTarget(oldRef);
string newRefName = oldRef.CanonicalName;
- if (oldRef.IsTag() && options.TagNameRewriter != null)
+ if (oldRef.IsTag && options.TagNameRewriter != null)
{
newRefName = Reference.TagPrefix +
options.TagNameRewriter(oldRef.CanonicalName.Substring(Reference.TagPrefix.Length),
diff --git a/LibGit2Sharp/Reference.cs b/LibGit2Sharp/Reference.cs
index 3c9cd141..90929c92 100644
--- a/LibGit2Sharp/Reference.cs
+++ b/LibGit2Sharp/Reference.cs
@@ -105,9 +105,9 @@ namespace LibGit2Sharp
/// Determine if the current <see cref="Reference"/> is a tag.
/// </summary>
/// <returns>true if the current <see cref="Reference"/> is a tag, false otherwise.</returns>
- public virtual bool IsTag()
+ public virtual bool IsTag
{
- return CanonicalName.LooksLikeTag();
+ get { return CanonicalName.LooksLikeTag(); }
}
/// <summary>