Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Feb 3, 2023. It is now read-only.

Commit 35ea14d

Browse files
committed
Drop obsolete members after release v0.17.0
1 parent cccecb2 commit 35ea14d

11 files changed

+9
-279
lines changed

LibGit2Sharp/CommitLog.cs

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -81,29 +81,6 @@ public ICommitLog QueryBy(CommitFilter filter)
8181
return new CommitLog(repo, filter);
8282
}
8383

84-
/// <summary>
85-
/// Find the best possible common ancestor given two <see cref="Commit"/>s.
86-
/// </summary>
87-
/// <param name="first">The first <see cref="Commit"/>.</param>
88-
/// <param name="second">The second <see cref="Commit"/>.</param>
89-
/// <returns>The common ancestor or null if none found.</returns>
90-
[Obsolete("This method will be removed in the next release. Please use FindMergeBase(Commit, Commit).")]
91-
public Commit FindCommonAncestor(Commit first, Commit second)
92-
{
93-
return FindMergeBase(first, second);
94-
}
95-
96-
/// <summary>
97-
/// Find the best possible common ancestor given two or more <see cref="Commit"/>.
98-
/// </summary>
99-
/// <param name="commits">The <see cref="Commit"/>s for which to find the common ancestor.</param>
100-
/// <returns>The common ancestor or null if none found.</returns>
101-
[Obsolete("This method will be removed in the next release. Please use FindMergeBase(IEnumerable<Commit>, MergeBaseFindingStrategy).")]
102-
public Commit FindCommonAncestor(IEnumerable<Commit> commits)
103-
{
104-
return FindMergeBase(commits, MergeBaseFindingStrategy.Octopus);
105-
}
106-
10784
/// <summary>
10885
/// Find the best possible merge base given two <see cref="Commit"/>s.
10986
/// </summary>

LibGit2Sharp/FetchHead.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ namespace LibGit2Sharp
77
/// Represents a local reference data from a remote repository which
88
/// has been retreived through a Fetch process.
99
/// </summary>
10-
[Obsolete("This class is meant for internal use only and will not be public in the next release.")]
11-
public class FetchHead : ReferenceWrapper<GitObject>
10+
internal class FetchHead : ReferenceWrapper<GitObject>
1211
{
1312
/// <summary>
1413
/// Needed for mocking purposes.

LibGit2Sharp/IQueryableCommitLog.cs

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

43
namespace LibGit2Sharp
54
{
@@ -15,23 +14,6 @@ public interface IQueryableCommitLog : ICommitLog
1514
/// <returns>A list of commits, ready to be enumerated.</returns>
1615
ICommitLog QueryBy(CommitFilter filter);
1716

18-
/// <summary>
19-
/// Find the best possible common ancestor given two <see cref="Commit"/>s.
20-
/// </summary>
21-
/// <param name="first">The first <see cref="Commit"/>.</param>
22-
/// <param name="second">The second <see cref="Commit"/>.</param>
23-
/// <returns>The common ancestor or null if none found.</returns>
24-
[Obsolete("This method will be removed in the next release. Please use FindMergeBase(Commit, Commit).")]
25-
Commit FindCommonAncestor(Commit first, Commit second);
26-
27-
/// <summary>
28-
/// Find the best possible common ancestor given two or more <see cref="Commit"/>s.
29-
/// </summary>
30-
/// <param name="commits">The <see cref="Commit"/> for which to find the common ancestor.</param>
31-
/// <returns>The common ancestor or null if none found.</returns>
32-
[Obsolete("This method will be removed in the next release. Please use FindMergeBase(IEnumerable<Commit>, MergeBaseFindingStrategy).")]
33-
Commit FindCommonAncestor(IEnumerable<Commit> commits);
34-
3517
/// <summary>
3618
/// Find the best possible merge base given two <see cref="Commit"/>s.
3719
/// </summary>

LibGit2Sharp/IRepository.cs

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -167,19 +167,6 @@ public interface IRepository : IDisposable
167167
/// <returns>The generated <see cref="LibGit2Sharp.Commit"/>.</returns>
168168
Commit Commit(string message, Signature author, Signature committer, CommitOptions options = null);
169169

170-
/// <summary>
171-
/// Stores the content of the <see cref="Repository.Index"/> as a new <see cref="LibGit2Sharp.Commit"/> into the repository.
172-
/// The tip of the <see cref="Repository.Head"/> will be used as the parent of this new Commit.
173-
/// Once the commit is created, the <see cref="Repository.Head"/> will move forward to point at it.
174-
/// </summary>
175-
/// <param name="message">The description of why a change was made to the repository.</param>
176-
/// <param name="author">The <see cref="Signature"/> of who made the change.</param>
177-
/// <param name="committer">The <see cref="Signature"/> of who added the change to the repository.</param>
178-
/// <param name="amendPreviousCommit">True to amend the current <see cref="LibGit2Sharp.Commit"/> pointed at by <see cref="Repository.Head"/>, false otherwise.</param>
179-
/// <returns>The generated <see cref="LibGit2Sharp.Commit"/>.</returns>
180-
[Obsolete("This method will be removed in the next release. Please use a Commit overload that accepts a CommitOptions instead.")]
181-
Commit Commit(string message, Signature author, Signature committer, bool amendPreviousCommit);
182-
183170
/// <summary>
184171
/// Sets the current <see cref="Head"/> to the specified commit and optionally resets the <see cref="Index"/> and
185172
/// the content of the working tree to match.
@@ -206,12 +193,6 @@ public interface IRepository : IDisposable
206193
/// </summary>
207194
void RemoveUntrackedFiles();
208195

209-
/// <summary>
210-
/// Gets the references to the tips that are currently being merged.
211-
/// </summary>
212-
[Obsolete("This property is meant for internal use only and will not be public in the next release.")]
213-
IEnumerable<MergeHead> MergeHeads { get; }
214-
215196
/// <summary>
216197
/// Merge changes from commit into the branch pointed at by HEAD..
217198
/// </summary>

LibGit2Sharp/MergeHead.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1-
using System;
2-
using System.Globalization;
1+
using System.Globalization;
32

43
namespace LibGit2Sharp
54
{
65
/// <summary>
76
/// A merge head is a parent for the next commit.
87
/// </summary>
9-
[Obsolete("This class is meant for internal use only and will not be public in the next release.")]
10-
public class MergeHead : ReferenceWrapper<Commit>
8+
internal class MergeHead : ReferenceWrapper<Commit>
119
{
1210
/// <summary>
1311
/// Needed for mocking purposes.

LibGit2Sharp/Network.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -349,8 +349,7 @@ public virtual MergeResult Pull(Signature merger, PullOptions options)
349349
/// <summary>
350350
/// The heads that have been updated during the last fetch.
351351
/// </summary>
352-
[Obsolete("This property is meant for internal use only and will not be public in the next release.")]
353-
public virtual IEnumerable<FetchHead> FetchHeads
352+
internal virtual IEnumerable<FetchHead> FetchHeads
354353
{
355354
get
356355
{

LibGit2Sharp/ObjectDatabase.cs

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -182,21 +182,6 @@ public virtual Tree CreateTree(TreeDefinition treeDefinition)
182182
return treeDefinition.Build(repo);
183183
}
184184

185-
/// <summary>
186-
/// Inserts a <see cref="Commit"/> into the object database, referencing an existing <see cref="Tree"/>.
187-
/// </summary>
188-
/// <param name="message">The description of why a change was made to the repository.</param>
189-
/// <param name="author">The <see cref="Signature"/> of who made the change.</param>
190-
/// <param name="committer">The <see cref="Signature"/> of who added the change to the repository.</param>
191-
/// <param name="tree">The <see cref="Tree"/> of the <see cref="Commit"/> to be created.</param>
192-
/// <param name="parents">The parents of the <see cref="Commit"/> to be created.</param>
193-
/// <returns>The created <see cref="Commit"/>.</returns>
194-
[Obsolete("This method will be removed in the next release. Please use CreateCommit(Signature, Signature, string, bool, Tree, IEnumerable<Commit>) instead.")]
195-
public virtual Commit CreateCommit(string message, Signature author, Signature committer, Tree tree, IEnumerable<Commit> parents)
196-
{
197-
return CreateCommit(author, committer, message, true, tree, parents);
198-
}
199-
200185
/// <summary>
201186
/// Inserts a <see cref="Commit"/> into the object database, referencing an existing <see cref="Tree"/>.
202187
/// <para>

LibGit2Sharp/ReferenceCollection.cs

Lines changed: 0 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -98,20 +98,6 @@ public virtual DirectReference Add(string name, ObjectId targetId, bool allowOve
9898
return Add(name, targetId, null, null, allowOverwrite);
9999
}
100100

101-
/// <summary>
102-
/// Creates a direct reference with the specified name and target
103-
/// </summary>
104-
/// <param name="name">The canonical name of the reference to create.</param>
105-
/// <param name="targetId">Id of the target object.</param>
106-
/// <param name="logMessage">The optional message to log in the <see cref="ReflogCollection"/> when adding the <see cref="DirectReference"/></param>
107-
/// <param name="allowOverwrite">True to allow silent overwriting a potentially existing reference, false otherwise.</param>
108-
/// <returns>A new <see cref="Reference"/>.</returns>
109-
[Obsolete("This method will be removed in the next release. Prefer the overload that takes a signature and a message for the reflog.")]
110-
public virtual DirectReference Add(string name, ObjectId targetId, bool allowOverwrite, string logMessage)
111-
{
112-
return Add(name, targetId, null, logMessage, allowOverwrite);
113-
}
114-
115101
/// <summary>
116102
/// Creates a symbolic reference with the specified name and target
117103
/// </summary>
@@ -145,20 +131,6 @@ public virtual SymbolicReference Add(string name, Reference targetRef, bool allo
145131
return Add(name, targetRef, null, null, allowOverwrite);
146132
}
147133

148-
/// <summary>
149-
/// Creates a symbolic reference with the specified name and target
150-
/// </summary>
151-
/// <param name="name">The canonical name of the reference to create.</param>
152-
/// <param name="targetRef">The target reference.</param>
153-
/// <param name="logMessage">The optional message to log in the <see cref="ReflogCollection"/> when adding the <see cref="SymbolicReference"/></param>
154-
/// <param name="allowOverwrite">True to allow silent overwriting a potentially existing reference, false otherwise.</param>
155-
/// <returns>A new <see cref="Reference"/>.</returns>
156-
[Obsolete("This method will be removed in the next release. Prefer the overload that takes a signature and a message for the reflog.")]
157-
public virtual SymbolicReference Add(string name, Reference targetRef, bool allowOverwrite, string logMessage)
158-
{
159-
return Add(name, targetRef, null, logMessage, allowOverwrite);
160-
}
161-
162134
/// <summary>
163135
/// Remove a reference from the repository
164136
/// </summary>
@@ -257,19 +229,6 @@ public virtual Reference UpdateTarget(Reference directRef, ObjectId targetId)
257229
return UpdateTarget(directRef, targetId, null, null);
258230
}
259231

260-
/// <summary>
261-
/// Updates the target of a direct reference
262-
/// </summary>
263-
/// <param name="directRef">The direct reference which target should be updated.</param>
264-
/// <param name="targetId">The new target.</param>
265-
/// <param name="logMessage">The optional message to log in the <see cref="ReflogCollection"/> of the <paramref name="directRef"/> reference</param>
266-
/// <returns>A new <see cref="Reference"/>.</returns>
267-
[Obsolete("This method will be removed in the next release. Prefer the overload that takes a signature and a message for the reflog.")]
268-
public virtual Reference UpdateTarget(Reference directRef, ObjectId targetId, string logMessage)
269-
{
270-
return UpdateTarget(directRef, targetId, null, logMessage);
271-
}
272-
273232
/// <summary>
274233
/// Updates the target of a symbolic reference
275234
/// </summary>
@@ -308,19 +267,6 @@ public virtual Reference UpdateTarget(Reference symbolicRef, Reference targetRef
308267
return UpdateTarget(symbolicRef, targetRef, null, null);
309268
}
310269

311-
/// <summary>
312-
/// Updates the target of a symbolic reference
313-
/// </summary>
314-
/// <param name="symbolicRef">The symbolic reference which target should be updated.</param>
315-
/// <param name="targetRef">The new target.</param>
316-
/// <param name="logMessage">The optional message to log in the <see cref="ReflogCollection"/> of the <paramref name="symbolicRef"/> reference.</param>
317-
/// <returns>A new <see cref="Reference"/>.</returns>
318-
[Obsolete("This method will be removed in the next release. Prefer the overload that takes a signature and a message for the reflog.")]
319-
public virtual Reference UpdateTarget(Reference symbolicRef, Reference targetRef, string logMessage)
320-
{
321-
return UpdateTarget(symbolicRef, targetRef, null, logMessage);
322-
}
323-
324270
internal Reference UpdateHeadTarget<T>(T target, Signature signature, string logMessage)
325271
{
326272
Debug.Assert(signature != null);

LibGit2Sharp/ReferenceCollectionExtensions.cs

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -91,21 +91,6 @@ public static Reference Add(this ReferenceCollection refsColl, string name, stri
9191
return Add(refsColl, name, canonicalRefNameOrObjectish, null, null, allowOverwrite);
9292
}
9393

94-
/// <summary>
95-
/// Creates a direct or symbolic reference with the specified name and target
96-
/// </summary>
97-
/// <param name="refsColl">The <see cref="ReferenceCollection"/> being worked with.</param>
98-
/// <param name="name">The name of the reference to create.</param>
99-
/// <param name="canonicalRefNameOrObjectish">The target which can be either the canonical name of a reference or a revparse spec.</param>
100-
/// <param name="logMessage">The optional message to log in the <see cref="ReflogCollection"/> when adding the <see cref="Reference"/></param>
101-
/// <param name="allowOverwrite">True to allow silent overwriting a potentially existing reference, false otherwise.</param>
102-
/// <returns>A new <see cref="Reference"/>.</returns>
103-
[Obsolete("This method will be removed in the next release. Prefer the overload that takes a signature and a message for the reflog.")]
104-
public static Reference Add(this ReferenceCollection refsColl, string name, string canonicalRefNameOrObjectish, bool allowOverwrite, string logMessage)
105-
{
106-
return Add(refsColl, name, canonicalRefNameOrObjectish, null, logMessage, allowOverwrite);
107-
}
108-
10994
/// <summary>
11095
/// Updates the target of a direct reference.
11196
/// </summary>
@@ -139,20 +124,6 @@ public static Reference UpdateTarget(this ReferenceCollection refsColl, Referenc
139124
return UpdateTarget(refsColl, directRef, objectish, null, null);
140125
}
141126

142-
/// <summary>
143-
/// Updates the target of a direct reference
144-
/// </summary>
145-
/// <param name="refsColl">The <see cref="ReferenceCollection"/> being worked with.</param>
146-
/// <param name="directRef">The direct reference which target should be updated.</param>
147-
/// <param name="objectish">The revparse spec of the target.</param>
148-
/// <param name="logMessage">The optional message to log in the <see cref="ReflogCollection"/> of the <paramref name="directRef"/> reference.</param>
149-
/// <returns>A new <see cref="Reference"/>.</returns>
150-
[Obsolete("This method will be removed in the next release. Prefer the overload that takes a signature and a message for the reflog.")]
151-
public static Reference UpdateTarget(this ReferenceCollection refsColl, Reference directRef, string objectish, string logMessage)
152-
{
153-
return UpdateTarget(refsColl, directRef, objectish, null, logMessage);
154-
}
155-
156127
/// <summary>
157128
/// Rename an existing reference with a new name
158129
/// </summary>
@@ -239,21 +210,6 @@ public static Reference UpdateTarget(this ReferenceCollection refsColl, string n
239210
return UpdateTarget(refsColl, name, canonicalRefNameOrObjectish, null, null);
240211
}
241212

242-
/// <summary>
243-
/// Updates the target of a reference
244-
/// </summary>
245-
/// <param name="refsColl">The <see cref="ReferenceCollection"/> being worked with.</param>
246-
/// <param name="name">The canonical name of the reference.</param>
247-
/// <param name="canonicalRefNameOrObjectish">The target which can be either the canonical name of a reference or a revparse spec.</param>
248-
/// <param name="logMessage">The optional message to log in the <see cref="ReflogCollection"/> of the <paramref name="name"/> reference.</param>
249-
/// <returns>A new <see cref="Reference"/>.</returns>
250-
[Obsolete("This method will be removed in the next release. Prefer the overload that takes a signature and a message for the reflog.")]
251-
public static Reference UpdateTarget(this ReferenceCollection refsColl, string name, string canonicalRefNameOrObjectish, string logMessage)
252-
{
253-
return UpdateTarget(refsColl, name, canonicalRefNameOrObjectish, null, logMessage);
254-
}
255-
256-
257213
/// <summary>
258214
/// Delete a reference with the specified name
259215
/// </summary>

0 commit comments

Comments
 (0)