Skip to content

Commit 82fa7bb

Browse files
committed
Drop obsolete members after release v0.19.0
1 parent 290e4ff commit 82fa7bb

File tree

7 files changed

+3
-108
lines changed

7 files changed

+3
-108
lines changed

LibGit2Sharp/CloneOptions.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,6 @@ public CloneOptions()
3838
/// </summary>
3939
public CheckoutProgressHandler OnCheckoutProgress { get; set; }
4040

41-
/// <summary>
42-
/// Credentials to use for user/pass authentication
43-
/// </summary>
44-
[Obsolete("This will be removed in future release. Use CredentialsProvider.")]
45-
public Credentials Credentials { get; set; }
46-
4741
/// <summary>
4842
/// Handler to generate <see cref="LibGit2Sharp.Credentials"/> for authentication.
4943
/// </summary>

LibGit2Sharp/Credentials.cs

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,6 @@ public abstract class Credentials
2323

2424
internal interface ICredentialsProvider
2525
{
26-
/// <summary>
27-
/// The <see cref="Credentials"/> to authenticate with during the push.
28-
/// </summary>
29-
[Obsolete("This will be removed in future release. Use CredentialsProvider.")]
30-
Credentials Credentials { get; }
31-
3226
/// <summary>
3327
/// Handler to generate <see cref="LibGit2Sharp.Credentials"/> for authentication.
3428
/// </summary>
@@ -44,17 +38,12 @@ public static CredentialsHandler GetCredentialsHandler(this ICredentialsProvider
4438
return null;
4539
}
4640

47-
if (provider.CredentialsProvider != null)
48-
{
49-
return provider.CredentialsProvider;
50-
}
51-
52-
if (provider.Credentials == null)
41+
if (provider.CredentialsProvider == null)
5342
{
5443
return null;
5544
}
5645

57-
return (url, user, type) => provider.Credentials;
46+
return provider.CredentialsProvider;
5847
}
5948
}
6049
}

LibGit2Sharp/FetchOptions.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,6 @@ public sealed class FetchOptions : ICredentialsProvider
3939
/// </summary>
4040
public TransferProgressHandler OnTransferProgress { get; set; }
4141

42-
/// <summary>
43-
/// Credentials to use for username/password authentication.
44-
/// </summary>
45-
[Obsolete("This will be removed in future release. Use CredentialsProvider.")]
46-
public Credentials Credentials { get; set; }
47-
4842
/// <summary>
4943
/// Handler to generate <see cref="LibGit2Sharp.Credentials"/> for authentication.
5044
/// </summary>

LibGit2Sharp/Index.cs

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -127,22 +127,6 @@ IEnumerator IEnumerable.GetEnumerator()
127127

128128
#endregion
129129

130-
/// <summary>
131-
/// Promotes to the staging area the latest modifications of a file in the working directory (addition, updation or removal).
132-
///
133-
/// If this path is ignored by configuration then it will not be staged.
134-
/// </summary>
135-
/// <param name="path">The path of the file within the working directory.</param>
136-
/// <param name="explicitPathsOptions">
137-
/// If set, the passed <paramref name="path"/> will be treated as explicit paths.
138-
/// Use these options to determine how unmatched explicit paths should be handled.
139-
/// </param>
140-
[Obsolete("This will be removed in a future release. Supply ExplicitPathsOptions to StageOptions.")]
141-
public virtual void Stage(string path, ExplicitPathsOptions explicitPathsOptions)
142-
{
143-
Stage(path, new StageOptions { ExplicitPathsOptions = explicitPathsOptions });
144-
}
145-
146130
/// <summary>
147131
/// Promotes to the staging area the latest modifications of a file in the working directory (addition, updation or removal).
148132
///
@@ -157,22 +141,6 @@ public virtual void Stage(string path, StageOptions stageOptions = null)
157141
Stage(new[] { path }, stageOptions);
158142
}
159143

160-
/// <summary>
161-
/// Promotes to the staging area the latest modifications of a collection of files in the working directory (addition, updation or removal).
162-
///
163-
/// Any paths (even those listed explicitly) that are ignored by configuration will not be staged.
164-
/// </summary>
165-
/// <param name="paths">The collection of paths of the files within the working directory.</param>
166-
/// <param name="explicitPathsOptions">
167-
/// If set, the passed <paramref name="paths"/> will be treated as explicit paths.
168-
/// Use these options to determine how unmatched explicit paths should be handled.
169-
/// </param>
170-
[Obsolete("This will be removed in a future release. Supply ExplicitPathsOptions to StageOptions.")]
171-
public virtual void Stage(IEnumerable<string> paths, ExplicitPathsOptions explicitPathsOptions)
172-
{
173-
Stage(paths, new StageOptions { ExplicitPathsOptions = explicitPathsOptions });
174-
}
175-
176144
/// <summary>
177145
/// Promotes to the staging area the latest modifications of a collection of files in the working directory (addition, updation or removal).
178146
///

LibGit2Sharp/Network.cs

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -36,25 +36,6 @@ public virtual RemoteCollection Remotes
3636
get { return remotes.Value; }
3737
}
3838

39-
/// <summary>
40-
/// List references in a <see cref="Remote"/> repository.
41-
/// <para>
42-
/// When the remote tips are ahead of the local ones, the retrieved
43-
/// <see cref="DirectReference"/>s may point to non existing
44-
/// <see cref="GitObject"/>s in the local repository. In that
45-
/// case, <see cref="DirectReference.Target"/> will return <c>null</c>.
46-
/// </para>
47-
/// </summary>
48-
/// <param name="remote">The <see cref="Remote"/> to list from.</param>
49-
/// <param name="credentials">The optional <see cref="Credentials"/> used to connect to remote repository.</param>
50-
/// <returns>The references in the <see cref="Remote"/> repository.</returns>
51-
[Obsolete("This will be removed in future release. Use the overload ListReferences(Remote, CredentialsHandler).")]
52-
public virtual IEnumerable<DirectReference> ListReferences(Remote remote, Credentials credentials)
53-
{
54-
return ListReferences(remote,
55-
credentials == null ? null : new CredentialsHandler((url, user, type) => credentials));
56-
}
57-
5839
/// <summary>
5940
/// List references in a <see cref="Remote"/> repository.
6041
/// <para>

LibGit2Sharp/ObjectDatabase.cs

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -245,30 +245,6 @@ public virtual Tree CreateTree(TreeDefinition treeDefinition)
245245
return treeDefinition.Build(repo);
246246
}
247247

248-
/// <summary>
249-
/// Inserts a <see cref="Commit"/> into the object database, referencing an existing <see cref="Tree"/>.
250-
/// <para>
251-
/// Prettifing the message includes:
252-
/// * Removing empty lines from the beginning and end.
253-
/// * Removing trailing spaces from every line.
254-
/// * Turning multiple consecutive empty lines between paragraphs into just one empty line.
255-
/// * Ensuring the commit message ends with a newline.
256-
/// * Removing every line starting with "#".
257-
/// </para>
258-
/// </summary>
259-
/// <param name="author">The <see cref="Signature"/> of who made the change.</param>
260-
/// <param name="committer">The <see cref="Signature"/> of who added the change to the repository.</param>
261-
/// <param name="message">The description of why a change was made to the repository.</param>
262-
/// <param name="prettifyMessage">True to prettify the message, or false to leave it as is</param>
263-
/// <param name="tree">The <see cref="Tree"/> of the <see cref="Commit"/> to be created.</param>
264-
/// <param name="parents">The parents of the <see cref="Commit"/> to be created.</param>
265-
/// <returns>The created <see cref="Commit"/>.</returns>
266-
[Obsolete("This will be removed in future relases. Use the overload CreateCommit(Signature, Signature, string, Tree, IEnumerable<Commit>, bool, char).")]
267-
public virtual Commit CreateCommit(Signature author, Signature committer, string message, bool prettifyMessage, Tree tree, IEnumerable<Commit> parents)
268-
{
269-
return CreateCommit(author, committer, message, tree, parents, prettifyMessage);
270-
}
271-
272248
/// <summary>
273249
/// Inserts a <see cref="Commit"/> into the object database, referencing an existing <see cref="Tree"/>.
274250
/// <para>

LibGit2Sharp/PushOptions.cs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
using System;
2-
using LibGit2Sharp.Handlers;
1+
using LibGit2Sharp.Handlers;
32

43
namespace LibGit2Sharp
54
{
@@ -8,12 +7,6 @@ namespace LibGit2Sharp
87
/// </summary>
98
public sealed class PushOptions : ICredentialsProvider
109
{
11-
/// <summary>
12-
/// The <see cref="LibGit2Sharp.Credentials"/> to authenticate with during the push.
13-
/// </summary>
14-
[Obsolete("This will be removed in future release. Use CredentialsProvider.")]
15-
public Credentials Credentials { get; set; }
16-
1710
/// <summary>
1811
/// Handler to generate <see cref="LibGit2Sharp.Credentials"/> for authentication.
1912
/// </summary>

0 commit comments

Comments
 (0)