You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: LibGit2Sharp/CommitOptions.cs
+24Lines changed: 24 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -13,6 +13,19 @@ namespace LibGit2Sharp
13
13
/// </summary>
14
14
publicsealedclassCommitOptions
15
15
{
16
+
/// <summary>
17
+
/// Initializes a new instance of the <see cref="CommitOptions"/> class.
18
+
/// <para>
19
+
/// Default behavior:
20
+
/// The message is prettified.
21
+
/// No automatic removal of comments is performed.
22
+
/// </para>
23
+
/// </summary>
24
+
publicCommitOptions()
25
+
{
26
+
PrettifyMessage=true;
27
+
}
28
+
16
29
/// <summary>
17
30
/// True to amend the current <see cref="Commit"/> pointed at by <see cref="Repository.Head"/>, false otherwise.
18
31
/// </summary>
@@ -22,5 +35,16 @@ public sealed class CommitOptions
22
35
/// True to allow creation of an empty <see cref="Commit"/>, false otherwise.
23
36
/// </summary>
24
37
publicboolAllowEmptyCommit{get;set;}
38
+
39
+
/// <summary>
40
+
/// True to prettify the message by stripping leading and trailing empty lines, trailing whitespace, and collapsing consecutive empty lines, false otherwise.
41
+
/// </summary>
42
+
publicboolPrettifyMessage{get;set;}
43
+
44
+
/// <summary>
45
+
/// The starting line char used to identify commentaries in the Commit message during the prettifying of the Commit message. If set (usually to '#'), all lines starting with this char will be removed from the message before the Commit is done.
46
+
/// This property will only be considered when PrettifyMessage is set to true.
Copy file name to clipboardExpand all lines: LibGit2Sharp/ObjectDatabase.cs
+27-2Lines changed: 27 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -259,7 +259,32 @@ public virtual Tree CreateTree(TreeDefinition treeDefinition)
259
259
/// <param name="tree">The <see cref="Tree"/> of the <see cref="Commit"/> to be created.</param>
260
260
/// <param name="parents">The parents of the <see cref="Commit"/> to be created.</param>
261
261
/// <returns>The created <see cref="Commit"/>.</returns>
262
+
[Obsolete("This will be removed in future relases. Use the overload CreateCommit(Signature, Signature, string, Tree, IEnumerable<Commit>, bool, char).")]
0 commit comments