@@ -12,7 +12,7 @@ namespace LibGit2Sharp
12
12
/// </summary>
13
13
public class TagCollection : IEnumerable < Tag >
14
14
{
15
- private readonly Repository repo ;
15
+ internal readonly Repository repo ;
16
16
private const string refsTagsPrefix = "refs/tags/" ;
17
17
18
18
/// <summary>
@@ -100,24 +100,6 @@ public virtual Tag Add(string name, ObjectId targetId, Signature tagger, string
100
100
return this [ name ] ;
101
101
}
102
102
103
- /// <summary>
104
- /// Creates an annotated tag with the specified name.
105
- /// </summary>
106
- /// <param name = "name">The name.</param>
107
- /// <param name = "objectish">Revparse spec for the target object.</param>
108
- /// <param name = "tagger">The tagger.</param>
109
- /// <param name = "message">The message.</param>
110
- /// <param name = "allowOverwrite">True to allow silent overwriting a potentially existing tag, false otherwise.</param>
111
- /// <returns></returns>
112
- public virtual Tag Add ( string name , string objectish , Signature tagger , string message , bool allowOverwrite = false )
113
- {
114
- Ensure . ArgumentNotNullOrEmptyString ( objectish , "target" ) ;
115
-
116
- GitObject objectToTag = repo . Lookup ( objectish , GitObjectType . Any , LookUpOptions . ThrowWhenNoGitObjectHasBeenFound ) ;
117
-
118
- return Add ( name , objectToTag . Id , tagger , message , allowOverwrite ) ;
119
- }
120
-
121
103
internal static string PrettifyMessage ( string message )
122
104
{
123
105
var buffer = new byte [ NativeMethods . GIT_PATH_MAX ] ;
@@ -139,7 +121,7 @@ internal static string PrettifyMessage(string message)
139
121
[ Obsolete ( "This method will be removed in the next release. Please use Add() instead." ) ]
140
122
public virtual Tag Create ( string name , string target , Signature tagger , string message , bool allowOverwrite = false )
141
123
{
142
- return Add ( name , target , tagger , message , allowOverwrite ) ;
124
+ return this . Add ( name , target , tagger , message , allowOverwrite ) ;
143
125
}
144
126
145
127
/// <summary>
@@ -166,22 +148,6 @@ public virtual Tag Add(string name, ObjectId targetId, bool allowOverwrite = fal
166
148
return this [ name ] ;
167
149
}
168
150
169
- /// <summary>
170
- /// Creates a lightweight tag with the specified name.
171
- /// </summary>
172
- /// <param name = "name">The name.</param>
173
- /// <param name = "objectish">Revparse spec for the target object.</param>
174
- /// <param name = "allowOverwrite">True to allow silent overwriting a potentially existing tag, false otherwise.</param>
175
- /// <returns></returns>
176
- public virtual Tag Add ( string name , string objectish , bool allowOverwrite = false )
177
- {
178
- Ensure . ArgumentNotNullOrEmptyString ( objectish , "objectish" ) ;
179
-
180
- GitObject objectToTag = repo . Lookup ( objectish , GitObjectType . Any , LookUpOptions . ThrowWhenNoGitObjectHasBeenFound ) ;
181
-
182
- return Add ( name , objectToTag . Id , allowOverwrite ) ;
183
- }
184
-
185
151
/// <summary>
186
152
/// Creates a lightweight tag with the specified name.
187
153
/// </summary>
@@ -192,7 +158,7 @@ public virtual Tag Add(string name, string objectish, bool allowOverwrite = fals
192
158
[ Obsolete ( "This method will be removed in the next release. Please use Add() instead." ) ]
193
159
public virtual Tag Create ( string name , string target , bool allowOverwrite = false )
194
160
{
195
- return Add ( name , target , allowOverwrite ) ;
161
+ return this . Add ( name , target , allowOverwrite ) ;
196
162
}
197
163
198
164
/// <summary>
0 commit comments