@@ -219,6 +219,7 @@ private static Commit LookUpCommit(IRepository repository, string committish)
219
219
/// <param name="repository">The <see cref="Repository"/> being worked with.</param>
220
220
/// <param name="message">The description of why a change was made to the repository.</param>
221
221
/// <returns>The generated <see cref="LibGit2Sharp.Commit"/>.</returns>
222
+ [ Obsolete ( "This method will be removed in the next release. Please use Commit(string, Signature, Signature) instead." ) ]
222
223
public static Commit Commit ( this IRepository repository , string message )
223
224
{
224
225
return repository . Commit ( message , ( CommitOptions ) null ) ;
@@ -234,6 +235,7 @@ public static Commit Commit(this IRepository repository, string message)
234
235
/// <param name="message">The description of why a change was made to the repository.</param>
235
236
/// <param name="options">The <see cref="CommitOptions"/> that specify the commit behavior.</param>
236
237
/// <returns>The generated <see cref="LibGit2Sharp.Commit"/>.</returns>
238
+ [ Obsolete ( "This method will be removed in the next release. Please use Commit(string, Signature, Signature, CommitOptions) instead." ) ]
237
239
public static Commit Commit ( this IRepository repository , string message , CommitOptions options )
238
240
{
239
241
Signature author = repository . Config . BuildSignatureOrThrow ( DateTimeOffset . Now ) ;
@@ -251,6 +253,7 @@ public static Commit Commit(this IRepository repository, string message, CommitO
251
253
/// <param name="author">The <see cref="Signature"/> of who made the change.</param>
252
254
/// <param name="message">The description of why a change was made to the repository.</param>
253
255
/// <returns>The generated <see cref="LibGit2Sharp.Commit"/>.</returns>
256
+ [ Obsolete ( "This method will be removed in the next release. Please use Commit(string, Signature, Signature) instead." ) ]
254
257
public static Commit Commit ( this IRepository repository , string message , Signature author )
255
258
{
256
259
return repository . Commit ( message , author , ( CommitOptions ) null ) ;
@@ -267,13 +270,29 @@ public static Commit Commit(this IRepository repository, string message, Signatu
267
270
/// <param name="message">The description of why a change was made to the repository.</param>
268
271
/// <param name="options">The <see cref="CommitOptions"/> that specify the commit behavior.</param>
269
272
/// <returns>The generated <see cref="LibGit2Sharp.Commit"/>.</returns>
273
+ [ Obsolete ( "This method will be removed in the next release. Please use Commit(string, Signature, Signature, CommitOptions) instead." ) ]
270
274
public static Commit Commit ( this IRepository repository , string message , Signature author , CommitOptions options )
271
275
{
272
276
Signature committer = repository . Config . BuildSignatureOrThrow ( DateTimeOffset . Now ) ;
273
277
274
278
return repository . Commit ( message , author , committer , options ) ;
275
279
}
276
280
281
+ /// <summary>
282
+ /// Stores the content of the <see cref="Repository.Index"/> as a new <see cref="LibGit2Sharp.Commit"/> into the repository.
283
+ /// The tip of the <see cref="Repository.Head"/> will be used as the parent of this new Commit.
284
+ /// Once the commit is created, the <see cref="Repository.Head"/> will move forward to point at it.
285
+ /// </summary>
286
+ /// <param name="repository">The <see cref="IRepository"/> being worked with.</param>
287
+ /// <param name="message">The description of why a change was made to the repository.</param>
288
+ /// <param name="author">The <see cref="Signature"/> of who made the change.</param>
289
+ /// <param name="committer">The <see cref="Signature"/> of who added the change to the repository.</param>
290
+ /// <returns>The generated <see cref="LibGit2Sharp.Commit"/>.</returns>
291
+ public static Commit Commit ( this IRepository repository , string message , Signature author , Signature committer )
292
+ {
293
+ return repository . Commit ( message , author , committer , default ( CommitOptions ) ) ;
294
+ }
295
+
277
296
/// <summary>
278
297
/// Fetch from the specified remote.
279
298
/// </summary>
@@ -601,21 +620,6 @@ public static void Reset(this IRepository repository, Commit commit)
601
620
repository . Index . Replace ( commit , null , null ) ;
602
621
}
603
622
604
- /// <summary>
605
- /// Stores the content of the <see cref="Repository.Index"/> as a new <see cref="LibGit2Sharp.Commit"/> into the repository.
606
- /// The tip of the <see cref="Repository.Head"/> will be used as the parent of this new Commit.
607
- /// Once the commit is created, the <see cref="Repository.Head"/> will move forward to point at it.
608
- /// </summary>
609
- /// <param name="repository">The <see cref="IRepository"/> being worked with.</param>
610
- /// <param name="message">The description of why a change was made to the repository.</param>
611
- /// <param name="author">The <see cref="Signature"/> of who made the change.</param>
612
- /// <param name="committer">The <see cref="Signature"/> of who added the change to the repository.</param>
613
- /// <returns>The generated <see cref="LibGit2Sharp.Commit"/>.</returns>
614
- public static Commit Commit ( this IRepository repository , string message , Signature author , Signature committer )
615
- {
616
- return repository . Commit ( message , author , committer , null ) ;
617
- }
618
-
619
623
/// <summary>
620
624
/// Find where each line of a file originated.
621
625
/// </summary>
0 commit comments