8000 Obsolete NoteCollection.Remove() overload that do not require Signatu… · github/libgit2sharp@cfbec61 · GitHub
[go: up one dir, main page]

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Feb 3, 2023. It is now read-only.

Commit cfbec61

Browse files
committed
Obsolete NoteCollection.Remove() overload that do not require Signature parameters
1 parent a687471 commit cfbec61

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

LibGit2Sharp.Tests/NoteFixture.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,9 @@ public void CanRemoveANoteWithSignatureFromConfig()
279279

280280
Assert.NotEmpty(notes);
281281

282-
repo.Notes.Remove(commit.Id, repo.Notes.DefaultNamespace);
282+
Signature signature = repo.Config.BuildSignature(DateTimeOffset.Now);
283+
284+
repo.Notes.Remove(commit.Id, signature, signature, repo.Notes.DefaultNamespace);
283285

284286
Assert.Empty(notes);
285287

LibGit2Sharp/NoteCollection.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@ public virtual Note Add(ObjectId targetId, string message, Signature author, Sig
211211
/// </summary>
212212
/// <param name="targetId">The target <see cref="ObjectId"/>, for which the note will be created.</param>
213213
/// <param name="namespace">The namespace on which the note will be removed. It can be either a canonical namespace or an abbreviated namespace ('refs/notes/myNamespace' or just 'myNamespace').</param>
214+
[Obsolete("This method will be removed in the next release. Please use Remove(ObjectId, Signature, Signature, string) instead.")]
214215
public virtual void Remove(ObjectId targetId, string @namespace)
215216
{
216217
Signature author = repo.Config.BuildSignatureOrThrow(DateTimeOffset.Now);

0 commit comments

Comments
 (0)
0