diff options
author | Brendan Forster <brendan@github.com> | 2015-05-10 12:54:15 +0300 |
---|---|---|
committer | nulltoken <emeric.fermas@gmail.com> | 2015-05-15 20:31:41 +0300 |
commit | d16fbec108572d20f142127aba6c31f17074f932 (patch) | |
tree | 0fd595bc084520e4f068b58532a1b9d34c604d42 | |
parent | 1bb9d428b08a1742d85281d675fa49fff396751f (diff) |
Drop optional parameters in TagCollectionExtensions.cs
-rw-r--r-- | LibGit2Sharp/TagCollectionExtensions.cs | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/LibGit2Sharp/TagCollectionExtensions.cs b/LibGit2Sharp/TagCollectionExtensions.cs index f976e65e..20ad5305 100644 --- a/LibGit2Sharp/TagCollectionExtensions.cs +++ b/LibGit2Sharp/TagCollectionExtensions.cs @@ -14,9 +14,22 @@ namespace LibGit2Sharp /// <param name="objectish">Revparse spec for the target object.</param> /// <param name="tagger">The tagger.</param> /// <param name="message">The message.</param> + /// <param name="tags">The <see cref="TagCollection"/> being worked with.</param> + public static Tag Add(this TagCollection tags, string name, string objectish, Signature tagger, string message) + { + return tags.Add(name, objectish, tagger, message, false); + } + + /// <summary> + /// Creates an annotated tag with the specified name. + /// </summary> + /// <param name="name">The name.</param> + /// <param name="objectish">Revparse spec for the target object.</param> + /// <param name="tagger">The tagger.</param> + /// <param name="message">The message.</param> /// <param name="allowOverwrite">True to allow silent overwriting a potentially existing tag, false otherwise.</param> /// <param name="tags">The <see cref="TagCollection"/> being worked with.</param> - public static Tag Add(this TagCollection tags, string name, string objectish, Signature tagger, string message, bool allowOverwrite = false) + public static Tag Add(this TagCollection tags, string name, string objectish, Signature tagger, string message, bool allowOverwrite) { Ensure.ArgumentNotNullOrEmptyString(objectish, "target"); @@ -30,9 +43,20 @@ namespace LibGit2Sharp /// </summary> /// <param name="name">The name.</param> /// <param name="objectish">Revparse spec for the target object.</param> + /// <param name="tags">The <see cref="TagCollection"/> being worked with.</param> + public static Tag Add(this TagCollection tags, string name, string objectish) + { + return tags.Add(name, objectish, false); + } + + /// <summary> + /// Creates a lightweight tag with the specified name. + /// </summary> + /// <param name="name">The name.</param> + /// <param name="objectish">Revparse spec for the target object.</param> /// <param name="allowOverwrite">True to allow silent overwriting a potentially existing tag, false otherwise.</param> /// <param name="tags">The <see cref="TagCollection"/> being worked with.</param> - public static Tag Add(this TagCollection tags, string name, string objectish, bool allowOverwrite = false) + public static Tag Add(this TagCollection tags, string name, string objectish, bool allowOverwrite) { Ensure.ArgumentNotNullOrEmptyString(objectish, "objectish"); |