diff options
author | Edward Thomson <ethomson@microsoft.com> | 2014-04-09 19:19:06 +0400 |
---|---|---|
committer | Edward Thomson <ethomson@microsoft.com> | 2014-04-09 21:00:52 +0400 |
commit | bd85a5b8557e27105d6476c83486516c73b95cd9 (patch) | |
tree | bb996ab1277b2cd13857a91d241ad58930c4022c /LibGit2Sharp/IRepository.cs | |
parent | 8a303f2b24a053816d8d88c3733447ae5565e662 (diff) |
Introduce CommitOptions
Repository#Commit (and its extension methods) now take CommitOptions.
All prior methods are deprecated.
Diffstat (limited to 'LibGit2Sharp/IRepository.cs')
-rw-r--r-- | LibGit2Sharp/IRepository.cs | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/LibGit2Sharp/IRepository.cs b/LibGit2Sharp/IRepository.cs index 75e87b8b..61c96930 100644 --- a/LibGit2Sharp/IRepository.cs +++ b/LibGit2Sharp/IRepository.cs @@ -163,10 +163,22 @@ namespace LibGit2Sharp /// <param name="message">The description of why a change was made to the repository.</param> /// <param name="author">The <see cref="Signature"/> of who made the change.</param> /// <param name="committer">The <see cref="Signature"/> of who added the change to the repository.</param> + /// <param name="options">The <see cref="CommitOptions"/> that specify the commit behavior.</param> + /// <returns>The generated <see cref="Commit"/>.</returns> + Commit Commit(string message, Signature author, Signature committer, CommitOptions options = null); + + /// <summary> + /// Stores the content of the <see cref="Repository.Index"/> as a new <see cref="Commit"/> into the repository. + /// The tip of the <see cref="Repository.Head"/> will be used as the parent of this new Commit. + /// Once the commit is created, the <see cref="Repository.Head"/> will move forward to point at it. + /// </summary> + /// <param name="message">The description of why a change was made to the repository.</param> + /// <param name="author">The <see cref="Signature"/> of who made the change.</param> + /// <param name="committer">The <see cref="Signature"/> of who added the change to the repository.</param> /// <param name="amendPreviousCommit">True to amend the current <see cref="Commit"/> pointed at by <see cref="Repository.Head"/>, false otherwise.</param> - /// <param name="allowEmptyCommit">True to allow creation of an empty <see cref="Commit"/>, false otherwise.</param> /// <returns>The generated <see cref="Commit"/>.</returns> - Commit Commit(string message, Signature author, Signature committer, bool amendPreviousCommit = false, bool allowEmptyCommit = false); + [Obsolete("This method will be removed in the next release. Please use a Commit overload that accepts a CommitOptions instead.")] + Commit Commit(string message, Signature author, Signature committer, bool amendPreviousCommit); /// <summary> /// Sets the current <see cref="Head"/> to the specified commit and optionally resets the <see cref="Index"/> and |