8000 Drop obsolete members after release v0.20.0 · ravindp/libgit2sharp@1d7ed78 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1d7ed78

Browse files
committed
Drop obsolete members after release v0.20.0
1 parent a2682ed commit 1d7ed78

File tree

6 files changed

+0
-245
lines changed

6 files changed

+0
-245
lines changed

LibGit2Sharp/GlobalSettings.cs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,6 @@ public static class GlobalSettings
1313

1414
private static LogConfiguration logConfiguration = LogConfiguration.None;
1515

16-
/// <summary>
17-
/// Returns all the optional features that were compiled into
18-
/// libgit2.
19-
/// </summary>
20-
/// <returns>A <see cref="BuiltInFeatures"/> enumeration.</returns>
21-
[Obsolete("This method will be removed in the next release. Use Version.Features instead.")]
22-
public static BuiltInFeatures Features()
23-
{
24-
return Version.Features;
25-
}
26-
2716
/// <summary>
2817
/// Returns information related to the current LibGit2Sharp
2918
/// library.

LibGit2Sharp/Index.cs

Lines changed: 0 additions & 165 deletions
Original file line numberDiff line numberDiff line change
@@ -127,149 +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 unless <see cref="StageOptions.IncludeIgnored"/> is unset.
134-
/// </summary>
135-
/// <param name="path">The path of the file within the working directory.</param>
136-
/// <param name="stageOptions">If set, determines how paths will be staged.</param>
137-
[Obsolete("This method will be removed in the next release. Use IRepository.Stage() instead.")]
138-
public virtual void Stage(string path, StageOptions stageOptions = null)
139-
{
140-
repo.Stage(path, stageOptions);
141-
}
142-
143-
/// <summary>
144-
/// Promotes to the staging area the latest modifications of a collection of files in the working directory (addition, updation or removal).
145-
///
146-
/// Any paths (even those listed explicitly) that are ignored by configuration will not be staged unless <see cref="StageOptions.IncludeIgnored"/> is unset.
147-
/// </summary>
148-
/// <param name="paths">The collection of paths of the files within the working directory.</param>
149-
/// <param name="stageOptions">If set, determines how paths will be staged.</param>
150-
[Obsolete("This method will be removed in the next release. Use IRepository.Stage() instead.")]
151-
public virtual void Stage(IEnumerable<string> paths, StageOptions stageOptions = null)
152-
{
153-
repo.Stage(paths, stageOptions);
154-
}
155-
156-
/// <summary>
157-
/// Removes from the staging area all the modifications of a file since the latest commit (addition, updation or removal).
158-
/// </summary>
159-
/// <param name="path">The path of the file within the working directory.</param>
160-
/// <param name="explicitPathsOptions">
161-
/// If set, the passed <paramref name="path"/> will be treated as explicit paths.
162-
/// Use these options to determine how unmatched explicit paths should be handled.
163-
/// </param>
164-
[Obsolete("This method will be removed in the next release. Use IRepository.Unstage() instead.")]
165-
public virtual void Unstage(string path, ExplicitPathsOptions explicitPathsOptions = null)
166-
{
167-
repo.Unstage(path, explicitPathsOptions);
168-
}
169-
170-
/// <summary>
171-
A92E /// Removes from the staging area all the modifications of a collection of file since the latest commit (addition, updation or removal).
172-
/// </summary>
173-
/// <param name="paths">The collection of paths of the files within the working directory.</param>
174-
/// <param name="explicitPathsOptions">
175-
/// If set, the passed <paramref name="paths"/> will be treated as explicit paths.
176-
/// Use these options to determine how unmatched explicit paths should be handled.
177-
/// </param>
178-
[Obsolete("This method will be removed in the next release. Use IRepository.Unstage() instead.")]
179-
public virtual void Unstage(IEnumerable<string> paths, ExplicitPathsOptions explicitPathsOptions = null)
180-
{
181-
repo.Unstage(paths, explicitPathsOptions);
182-
}
183-
184-
/// <summary>
185-
/// Moves and/or renames a file in the working directory and promotes the change to the staging area.
186-
/// </summary>
187-
/// <param name="sourcePath">The path of the file within the working directory which has to be moved/renamed.</param>
188-
/// <param name="destinationPath">The target path of the file within the working directory.</param>
189-
[Obsolete("This method will be removed in the next release. Use IRepository.Move() instead.")]
190-
public virtual void Move(string sourcePath, string destinationPath)
191-
{
192-
repo.Move(new[] { sourcePath }, new[] { destinationPath });
193-
}
194-
195-
/// <summary>
196-
/// Moves and/or renames a collection of files in the working directory and promotes the changes to the staging area.
197-
/// </summary>
198-
/// <param name="sourcePaths">The paths of the files within the working directory which have to be moved/renamed.</param>
199- F438
/// <param name="destinationPaths">The target paths of the files within the working directory.</param>
200-
[Obsolete("This method will be removed in the next release. Use IRepository.Move() instead.")]
201-
public virtual void Move(IEnumerable<string> sourcePaths, IEnumerable<string> destinationPaths)
202-
{
203-
repo.Move(sourcePaths, destinationPaths);
204-
}
205-
206-
/// <summary>
207-
/// Removes a file from the staging area, and optionally removes it from the working directory as well.
208-
/// <para>
209-
/// If the file has already been deleted from the working directory, this method will only deal
210-
/// with promoting the removal to the staging area.
211-
/// </para>
212-
/// <para>
213-
/// The default behavior is to remove the file from the working directory as well.
214-
/// </para>
215-
/// <para>
216-
/// When not passing a <paramref name="explicitPathsOptions"/>, the passed path will be treated as
217-
/// a pathspec. You can for example use it to pass the relative path to a folder inside the working directory,
218-
/// so that all files beneath this folders, and the folder itself, will be removed.
219-
/// </para>
220-
/// </summary>
221-
/// <param name="path">The path of the file within the working directory.</param>
222-
/// <param name="removeFromWorkingDirectory">True to remove the file from the working directory, False otherwise.</param>
223-
/// <param name="explicitPathsOptions">
224-
/// If set, the passed <paramref name="path"/> will be treated as an explicit path.
225-
/// Use these options to determine how unmatched explicit paths should be handled.
226-
/// </param>
227-
[Obsolete("This method will be removed in the next release. Use IRepository.Remove() instead.")]
228-
public virtual void Remove(string path, bool removeFromWorkingDirectory = true, ExplicitPathsOptions explicitPathsOptions = null)
229-
{
230-
repo.Remove(new[] { path }, removeFromWorkingDirectory, explicitPathsOptions);
231-
}
232-
233-
/// <summary>
234-
/// Removes a collection of fileS from the staging, and optionally removes them from the working directory as well.
235-
/// <para>
236-
/// If a file has already been deleted from the working directory, this method will only deal
237-
/// with promoting the removal to the staging area.
238-
/// </para>
239-
/// <para>
240-
/// The default behavior is to remove the files from the working directory as well.
241-
/// </para>
242-
/// <para>
243-
/// When not passing a <paramref name="explicitPathsOptions"/>, the passed paths will be treated as
244-
/// a pathspec. You can for example use it to pass the relative paths to folders inside the working directory,
245-
/// so that all files beneath these folders, and the folders themselves, will be removed.
246-
/// </para>
247-
/// </summary>
248-
/// <param name="paths">The collection of paths of the files within the working directory.</param>
249-
/// <param name="removeFromWorkingDirectory">True to remove the files from the working directory, False otherwise.</param>
250-
/// <param name="explicitPathsOptions">
251-
/// If set, the passed <paramref name="paths"/> will be treated as explicit paths.
252-
/// Use these options to determine how unmatched explicit paths should be handled.
253-
/// </param>
254-
[Obsolete("This method will be removed in the next release. Use IRepository.Remove() instead.")]
255-
public virtual void Remove(IEnumerable<string> paths, bool removeFromWorkingDirectory = true, ExplicitPathsOptions explicitPathsOptions = null)
256-
{
257-
repo.Remove(paths, removeFromWorkingDirectory, explicitPathsOptions);
258-
}
259-
260-
/// <summary>
261-
/// Replaces entries in the staging area with entries from the specified tree.
262-
/// <para>
263-
/// This overwrites all existing state in the staging area.
264-
/// </para>
265-
/// </summary>
266-
/// <param name="source">The <see cref="Tree"/> to read the entries from.</param>
267-
[Obsolete("This method will be removed in the next release. Use Replace instead.")]
268-
public virtual void Reset(Tree source)
269-
{
270-
Replace(source);
271-
}
272-
273130
/// <summary>
274131
/// Replaces entries in the staging area with entries from the specified tree.
275132
/// <para>
@@ -312,28 +169,6 @@ private void UpdatePhysicalIndex()
312169
Proxy.git_index_write(handle);
313170
}
314171

315-
/// <summary>
316-
/// Retrieves the state of a file in the working directory, comparing it against the staging area and the latest commmit.
317-
/// </summary>
318-
EED3 /// <param name="filePath">The relative path within the working directory to the file.</param>
319-
/// <returns>A <see cref="FileStatus"/> representing the state of the <paramref name="filePath"/> parameter.</returns>
320-
[Obsolete("This method will be removed in the next release. Use IRepository.RetrieveStatus() instead.")]
321-
public virtual FileStatus RetrieveStatus(string filePath)
322-
{
323-
return repo.RetrieveStatus(filePath);
324-
}
325-
326-
/// <summary>
327-
/// Retrieves the state of all files in the working directory, comparing them against the staging area and the latest commmit.
328-
/// </summary>
329-
/// <param name="options">If set, the options that control the status investigation.</param>
330-
/// <returns>A <see cref="RepositoryStatus"/> holding the state of all the files.</returns>
331-
[Obsolete("This method will be removed in the next release. Use IRepository.RetrieveStatus() instead.")]
332-
public virtual RepositoryStatus RetrieveStatus(StatusOptions options = null)
333-
{
334-
return repo.RetrieveStatus(options);
335-
}
336-
337172
internal void Replace(TreeChanges changes)
338173
{
339174
foreach (TreeEntryChanges treeEntryChanges in changes)

LibGit2Sharp/Reference.cs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,6 @@ public abstract class Reference : IEquatable<Reference>, IBelongToARepository
2525
protected Reference()
2626
{ }
2727

28-
/// <summary>
29-
/// Initializes a new instance of the <see cref="Reference"/> class.
30-
/// </summary>
31-
/// <param name="canonicalName">The canonical name.</param>
32-
/// <param name="targetIdentifier">The target identifier.</param>
33-
[Obsolete("This ctor will be removed in a future release.")]
34-
protected Reference(string canonicalName, string targetIdentifier)
35-
: this(null, canonicalName, targetIdentifier)
36-
{
37-
}
38-
3928
/// <remarks>
4029
/// This would be protected+internal, were that supported by C#.
4130
/// Do not use except in subclasses.

LibGit2Sharp/ReferenceCollection.cs

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -142,34 +142,6 @@ public virtual void Remove(Reference reference)
142142
Proxy.git_reference_remove(repo.Handle, reference.CanonicalName);
143143
}
144144

145-
/// <summary>
146-
/// Rename an existing reference with a new name, and update the reflog
147-
/// </summary>
148-
/// <param name="reference">The reference to rename.</param>
149-
/// <param name="newName">The new canonical name.</param>
150-
/// <param name="signature">Identity used for updating the reflog.</param>
151-
/// <param name="logMessage">Message added to the reflog.</param>
152-
/// <param name="allowOverwrite">True to allow silent overwriting a potentially existing reference, false otherwise.</param>
153-
/// <returns>A new <see cref="Reference"/>.</returns>
154-
[Obsolete("This method will be removed in the next release. Please use Rename() instead.")]
155-
public virtual Reference Move(Reference reference, string newName, Signature signature, string logMessage = null, bool allowOverwrite = false)
156-
{
157-
return Rename(reference, newName, signature, logMessage, allowOverwrite);
158-
}
159-
160-
/// <summary>
161-
/// Rename an existing reference with a new name
162-
/// </summary>
163-
/// <param name="reference">The reference to rename.</param>
164-
/// <param name="newName">The new canonical name.</param>
165-
/// <param name="allowOverwrite">True to allow silent overwriting a potentially existing reference, false otherwise.</param>
166-
/// <returns>A new <see cref="Reference"/>.</returns>
167-
[Obsolete("This method will be removed in the next release. Please use Rename() instead.")]
168-
public virtual Reference Move(Reference reference, string newName, bool allowOverwrite = false)
169-
{
170-
return Rename(reference, newName, null, null, allowOverwrite);
171-
}
172-
173145
/// <summary>
174146
/// Rename an existing reference with a new name, and update the reflog
175147
/// </summary>

LibGit2Sharp/ReferenceCollectionExtensions.cs

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -124,23 +124,6 @@ public static Reference UpdateTarget(this ReferenceCollection refsColl, Referenc
124124
return UpdateTarget(refsColl, directRef, objectish, null, null);
125125
}
126126

127-
/// <summary>
128-
/// Rename an existing reference with a new name
129-
/// </summary>
130-
/// <param name="currentName">The canonical name of the reference to rename.</param>
131-
/// <param name="newName">The new canonical name.</param>
132-
/// <param name="signature">The identity used for updating the reflog</param>
133-
/// <param name="logMessage">The optional message to log in the <see cref="ReflogCollection"/></param>
134-
/// <param name="allowOverwrite">True to allow silent overwriting a potentially existing reference, false otherwise.</param>
135-
/// <param name="refsColl">The <see cref="ReferenceCollection"/> being worked with.</param>
136-
/// <returns>A new <see cref="Reference"/>.</returns>
137-
[Obsolete("This method will be removed in the next release. Please use Rename() instead.")]
138-
public static Reference Move(this ReferenceCollection refsColl, string currentName, string newName,
139-
Signature signature = null, string logMessage = null, bool allowOverwrite = false)
140-
{
141-
return refsColl.Rename(currentName, newName, signature, logMessage, allowOverwrite);
142-
}
143-
144127
/// <summary>
145128
/// Rename an existing reference with a new name
146129
/// </summary>

LibGit2Sharp/Repository.cs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -961,19 +961,6 @@ internal T RegisterForCleanup<T>(T disposable) where T : IDisposable
961961
return disposable;
962962
}
963963

964-
/// <summary>
965-
/// Gets the current LibGit2Sharp version.
966-
/// <para>
967-
/// The format of the version number is as follows:
968-
/// <para>Major.Minor.Patch-LibGit2Sharp_abbrev_hash-libgit2_abbrev_hash (x86|amd64 - features)</para>
969-
/// </para>
970-
/// </summary>
971-
[Obsolete("This property will be removed in the next release. Use GlobalSettings.Version instead.")]
972-
public static string Version
973-
{
974-
get { return GlobalSettings.Version.ToString(); }
975-
}
976-
977964
/// <summary>
978965
/// Merges changes from commit into the branch pointed at by HEAD.
979966
/// </summary>

0 commit comments

Comments
 (0)
0