8000 Drop obsolete members after release v0.15.0 · pmiossec/libgit2sharp@2ff661a · GitHub
[go: up one dir, main page]

Skip to content

Commit 2ff661a

Browse files
committed
Drop obsolete members after release v0.15.0
1 parent d71ccce commit 2ff661a

9 files changed

+0
-251
lines changed

LibGit2Sharp/Blob.cs

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -35,18 +35,6 @@ internal Blob(Repository repo, ObjectId id)
3535
/// </summary>
3636
public virtual bool IsBinary { get { return lazyIsBinary.Value; } }
3737

38-
/// <summary>
39-
/// Gets the blob content in a <see cref="byte"/> array.
40-
/// </summary>
41-
[Obsolete("This property will be removed in the next release. Please use one of the GetContentStream() overloads instead.")]
42-
public virtual byte[] Content
43-
{
44-
get
45-
{
46-
return Proxy.git_blob_rawcontent(repo.Handle, Id, Size);
47-
}
48-
}
49-
5038
/// <summary>
5139
/// Gets the blob content in a <see cref="Stream"/>.
5240
/// </summary>
@@ -65,17 +53,5 @@ public virtual Stream GetContentStream(FilteringOptions filteringOptions)
6553
Ensure.ArgumentNotNull(filteringOptions, "filteringOptions");
6654
return Proxy.git_blob_filtered_content_stream(repo.Handle, Id, filteringOptions.HintPath, false);
6755
}
68-
69-
/// <summary>
70-
/// Gets the blob content in a <see cref="Stream"/>.
71-
/// </summary>
72-
[Obsolete("This property will be removed in the next release. Please use one of the GetContentStream() overloads instead.")]
73-
public virtual Stream ContentStream
74-
{
75-
get
76-
{
77-
return GetContentStream();
78-
}
79-
}
8056
}
8157
}

LibGit2Sharp/BlobExtensions.cs

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -10,36 +10,6 @@ namespace LibGit2Sharp
1010
/// </summary>
1111
public static class BlobExtensions
1212
{
13-
/// <summary>
14-
/// Gets the blob content decoded with the specified encoding,
15-
/// or according to byte order marks, with UTF8 as fallback,
16-
/// if <paramref name="encoding"/> is null.
17-
/// </summary>
18-
/// <param name="blob">The blob for which the content will be returned.</param>
19-
/// <param name="encoding">The encoding of the text. (default: detected or UTF8)</param>
20-
/// <returns>Blob content as text.</returns>
21-
[Obsolete("This method will be removed in the next release. Please use one of the GetContentText() overloads instead.")]
22-
public static string ContentAsText(this Blob blob, Encoding encoding = null)
23-
{
24-
return GetContentText(blob, encoding);
25-
}
26-
27-
/// <summary>
28-
/// Gets the blob content as it would be checked out to the
29-
/// working directory, decoded with the specified encoding,
30-
/// or according to byte order marks, with UTF8 as fallback,
31-
/// if <paramref name="encoding"/> is null.
32-
/// </summary>
33-
/// <param name="blob">The blob for which the content will be returned.</param>
34-
/// <param name="filteringOptions">Parameter controlling content filtering behavior</param>
35-
/// <param name="encoding">The encoding of the text. (default: detected or UTF8)</param>
36-
/// <returns>Blob content as text.</returns>
37-
[Obsolete("This method will be removed in the next release. Please use one of the GetContentText() overloads instead.")]
38-
public static string ContentAsText(this Blob blob, FilteringOptions filteringOptions, Encoding encoding = null)
39-
{
40-
return GetContentText(blob, filteringOptions, encoding);
41-
}
42-
4313
/// <summary>
4414
/// Gets the blob content decoded with the specified encoding,
4515
/// or according to byte order marks, with UTF8 as fallback,

LibGit2Sharp/IRepository.cs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -164,15 +164,6 @@ public interface IRepository : IDisposable
164164
/// <returns>The generated <see cref="Commit"/>.</returns>
165165
Commit Commit(string message, Signature author, Signature committer, bool amendPreviousCommit = false);
166166

167-
/// <summary>
168-
/// Sets the current <see cref="Head"/> to the specified commit and optionally resets the <see cref="Index"/> and
169-
/// the content of the working tree to match.
170-
/// </summary>
171-
/// <param name="resetOptions">Flavor of reset operation to perform.</param>
172-
/// <param name="commit">The target commit object.</param>
173-
[Obsolete("This method will be removed in the next release. Please use Reset(ResetMode, Commit) instead.")]
174-
void Reset(ResetOptions resetOptions, Commit commit);
175-
176167
/// <summary>
177168
/// Sets the current <see cref="Head"/> to the specified commit and optionally resets the <see cref="Index"/> and
178169
/// the content of the working tree to match.

LibGit2Sharp/LibGit2Sharp.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,6 @@
280280
<Compile Include="Core\Handles\RepositorySafeHandle.cs" />
281281
<Compile Include="RepositoryOptions.cs" />
282282
<Compile Include="RepositoryStatus.cs" />
283-
<Compile Include="ResetOptions.cs" />
284283
<Compile Include="Signature.cs" />
285284
<Compile Include="StatusEntry.cs" />
286285
<Compile Include="SymbolicReference.cs" />

LibGit2Sharp/Network.cs

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -133,46 +133,6 @@ static void DoFetch(RemoteSafeHandle remoteHandle, FetchOptions options)
133133
}
134134
}
135135

136-
/// <summary>
137-
/// Fetch from the <see cref="Remote"/>.
138-
/// </summary>
139-
/// <param name="remote">The remote to fetch</param>
140-
/// <param name="tagFetchMode">Optional parameter indicating what tags to download.</param>
141-
/// <param name="onProgress">Progress callback. Corresponds to libgit2 progress callback.</param>
142-
/// <param name="onUpdateTips">UpdateTips callback. Corresponds to libgit2 update_tips callback.</param>
143-
/// <param name="onTransferProgress">Callback method that transfer progress will be reported through.
144-
/// Reports the client's state regarding the received and processed (bytes, objects) from the server.</param>
145-
/// <param name="credentials">Credentials to use for username/password authentication.</param>
146-
[Obsolete("This overload will be removed in the next release. Please use Fetch(Remote, FetchOptions) instead.")]
147-
public virtual void Fetch(
148-
Remote remote,
149-
TagFetchMode? tagFetchMode = null,
150-
ProgressHandler onProgress = null,
151-
UpdateTipsHandler onUpdateTips = null,
152-
TransferProgressHandler onTransferProgress = null,
153-
Credentials credentials = null)
154-
{
155-
Fetch(remote, new FetchOptions
156-
{
157-
TagFetchMode = tagFetchMode,
158-
OnProgress = onProgress,
159-
OnUpdateTips = onUpdateTips,
160-
OnTransferProgress = onTransferProgress,
161-
Credentials = credentials
162-
});
163-
}
164-
165-
/// <summary>
166-
/// Fetch from the <see cref="Remote"/>.
167-
/// </summary>
168-
/// <param name="remote">The remote to fetch</param>
169-
public virtual void Fetch(Remote remote)
170-
{
171-
// This overload is required as long as the obsolete overload exists.
172-
// Otherwise, Fetch(Remote) is ambiguous.
173-
Fetch(remote, (FetchOptions)null);
174-
}
175-
176136
/// <summary>
177137
/// Fetch from the <see cref="Remote"/>.
178138
/// </summary>

LibGit2Sharp/ObjectId.cs

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -305,54 +305,6 @@ private static bool LooksValid(string objectId, bool throwIfInvalid)
305305
return objectId.All(c => hexDigits.Contains(c.ToString(CultureInfo.InvariantCulture)));
306306
}
307307

308-
/// <summary>
309-
/// Determine whether the beginning of this instance matches the
310-
/// <paramref name="len"/> first nibbles of <paramref name="rawId"/>.
311-
/// </summary>
312-
/// <param name="rawId">The byte array to compare the <see cref="ObjectId"/> against.</param>
313-
/// <param name="len">The number of nibbles from <paramref name="rawId"/> </param>
314-
/// <returns></returns>
315-
[Obsolete("This method will be removed in the next release. Please use one of the StartsWith(string) overload instead.")]
316-
public bool StartsWith(byte[] rawId, int len)
317-
{
318-
Ensure.ArgumentNotNull(rawId, "rawId");
319-
320-
if (len < 1 || len > HexSize)
321-
{
322-
throw new ArgumentOutOfRangeException("len");
323-
}
324-
325-
if (len > rawId.Length * 2)
326-
{
327-
throw new ArgumentOutOfRangeException("len", "len exceeds the size of rawId");
328-
}
329-
330-
bool match = true;
331-
332-
int length = len >> 1;
333-
for (int i = 0; i < length; i++)
334-
{
335-
if (RawId[i] != rawId[i])
336-
{
337-
match = false;
338-
break;
339-
}
340-
}
341-
342-
if (match && ((len & 1) == 1))
343-
{
344-
var a = RawId[length] >> 4;
345-
var b = rawId[length] >> 4;
346-
347-
if (a != b)
348-
{
349-
match = false;
350-
}
351-
}
352-
353-< 1241 /span>
return match;
354-
}
355-
356308
/// <summary>
357309
/// Determine whether <paramref name="shortSha"/> matches the hexified
358310
/// representation of the first nibbles of this instance.

LibGit2Sharp/Repository.cs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -795,18 +795,6 @@ private void CheckoutTree(
795795
}
796796
}
797797

798-
/// <summary>
799-
/// Sets the current <see cref="Head"/> to the specified commit and optionally resets the <see cref="Index"/> and
800-
/// the content of the working tree to match.
801-
/// </summary>
802-
/// <param name="resetOptions">Flavor of reset operation to perform.</param>
803-
/// <param name="commit">The target commit object.</param>
804-
[Obsolete("This method will be removed in the next release. Please use Reset(ResetMode, Commit) instead.")]
805-
public void Reset(ResetOptions resetOptions, Commit commit)
806-
{
807-
Reset((ResetMode)resetOptions, commit);
808-
}
809-
810798
/// <summary>
811799
/// Sets the current <see cref="Head"/> to the specified commit and optionally resets the <see cref="Index"/> and
812800
/// the content of the working tree to match.

LibGit2Sharp/RepositoryExtensions.cs

Lines changed: 0 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -140,19 +140,6 @@ public static Branch CreateBranch(this IRepository repository, string branchName
140140
return repository.Branches.Add(branchName, committish);
141141
}
142142

143-
/// <summary>
144-
/// Sets the current <see cref="Repository.Head"/> to the specified commit and optionally resets the <see cref="Index"/> and
145-
/// the content of the working tree to match.
146-
/// </summary>
147-
/// <param name="repository">The <see cref="Repository"/> being worked with.</param>
148-
/// <param name="resetOptions">Flavor of reset operation to perform.</param>
149-
/// <param name="committish">A revparse spec for the target commit object.</param>
150-
[Obsolete("This method will be removed in the next release. Please use Reset(this IRepository, ResetMode, string) instead.")]
151-
public static void Reset(this IRepository repository, ResetOptions resetOptions, string committish = "HEAD")
152-
{
153-
repository.Reset((ResetMode) resetOptions, committish);
154-
}
155-
156143
/// <summary>
157144
/// Sets the current <see cref="Repository.Head"/> to the specified commit and optionally resets the <see cref="Index"/> and
158145
/// the content of the working tree to match.
@@ -235,51 +222,6 @@ public static Commit Commit(this IRepository repository, string message, Signatu
235222
return repository.Commit(message, author, committer, amendPreviousCommit);
236223
}
237224

238-
/// <summary>
239-
/// Fetch from the specified remote.
240-
/// </summary>
241-
/// <param name="repository">The <see cref="Repository"/> being worked with.</param>
242-
/// <param name="remoteName">The name of the <see cref="Remote"/> to fetch from.</param>
243-
/// <param name="tagFetchMode">Optional parameter indicating what tags to download.</param>
244-
/// <param name="onProgress">Progress callback. Corresponds to libgit2 progress callback.</param>
245-
/// <param name="onUpdateTips">UpdateTips callback. Corresponds to libgit2 update_tips callback.</param>
246-
/// <param name="onTransferProgress">Callback method that transfer progress will be reported through.
247-
/// Reports the client's state regarding the received and processed (bytes, objects) from the server.</param>
248-
/// <param name="credentials">Credentials to use for username/password authentication.</param>
249-
[Obsolete("This overload will be removed in the next release. Please use Fetch(Remote, FetchOptions) instead.")]
250-
public static void Fetch(this IRepository repository, string remoteName,
251-
TagFetchMode tagFetchMode = TagFetchMode.Auto,
252-
ProgressHandler onProgress = null,
253-
UpdateTipsHandler onUpdateTips = null,
254-
TransferProgressHandler onTransferProgress = null,
255-
Credentials credentials = null)
256-
{
257-
Ensure.ArgumentNotNull(repository, "repository");
258-
Ensure.ArgumentNotNullOrEmptyString(remoteName, "remoteName");
259-
260-
Remote remote = repository.Network.Remotes.RemoteForName(remoteName, true);
261-
repository.Network.Fetch(remote, new FetchOptions
262-
{
263-
TagFetchMode = tagFetchMode,
264-
OnProgress = onProgress,
265-
OnUpdateTips = onUpdateTips,
266-
OnTransferProgress = onTransferProgress,
267-
Credentials = credentials
268-
});
269-
}
270-
271-
/// <summary>
272-
/// Fetch from the specified remote.
273-
/// </summary>
274-
/// <param name="repository">The <see cref="Repository"/> being worked with.</param>
275-
/// <param name="remoteName">The name of the <see cref="Remote"/> to fetch from.</param>
276-
public static void Fetch(this IRepository repository, string remoteName)
277-
{
278-
// This overload is required as long as the obsolete overload exists.
279-
// Otherwise, Fetch(string) is ambiguous.
280-
Fetch(repository, remoteName, (FetchOptions)null);
281-
}
282-
283225
/// <summary>
284226
/// Fetch from the specified remote.
285227
/// </summary>

LibGit2Sharp/ResetOptions.cs

Lines changed: 0 additions & 29 deletions
This file was deleted.

0 commit comments

Comments
 (0)
0