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-08-18 12:23:20 +0300
committernulltoken <emeric.fermas@gmail.com>2015-08-18 12:23:20 +0300
commita6874715646d93eb83273da9c2db9ff8a4cac31a (patch)
tree9702efc7a5f2f8a3af2b4900f777a04ab42a52de
parentb69e3e2ae8f44e7a03e7146324d67c3628925c27 (diff)
Obsolete NoteCollection.Add() overload that do not require Signature parameters
-rw-r--r--LibGit2Sharp.Tests/NoteFixture.cs5
-rw-r--r--LibGit2Sharp/NoteCollection.cs1
2 files changed, 5 insertions, 1 deletions
diff --git a/LibGit2Sharp.Tests/NoteFixture.cs b/LibGit2Sharp.Tests/NoteFixture.cs
index 744c1565..e3208c23 100644
--- a/LibGit2Sharp.Tests/NoteFixture.cs
+++ b/LibGit2Sharp.Tests/NoteFixture.cs
@@ -175,7 +175,10 @@ namespace LibGit2Sharp.Tests
using (var repo = new Repository(path, options))
{
var commit = repo.Lookup<Commit>("9fd738e8f7967c078dceed8190330fc8648ee56a");
- var note = repo.Notes.Add(commit.Id, "I'm batman!\n", "batmobile");
+
+ Signature signature = repo.Config.BuildSignature(DateTimeOffset.Now);
+
+ var note = repo.Notes.Add(commit.Id, "I'm batman!\n", signature, signature, "batmobile");
var newNote = commit.Notes.Single();
Assert.Equal(note, newNote);
diff --git a/LibGit2Sharp/NoteCollection.cs b/LibGit2Sharp/NoteCollection.cs
index c722221c..228fa3f1 100644
--- a/LibGit2Sharp/NoteCollection.cs
+++ b/LibGit2Sharp/NoteCollection.cs
@@ -171,6 +171,7 @@ namespace LibGit2Sharp
/// <param name="message">The note message.</param>
/// <param name="namespace">The namespace on which the note will be created. It can be either a canonical namespace or an abbreviated namespace ('refs/notes/myNamespace' or just 'myNamespace').</param>
/// <returns>The note which was just saved.</returns>
+ [Obsolete("This method will be removed in the next release. Please use Add(ObjectId, string, Signature, Signature, string) instead.")]
public virtual Note Add(ObjectId targetId, string message, string @namespace)
{
Signature author = repo.Config.BuildSignatureOrThrow(DateTimeOffset.Now);