Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions LibGit2Sharp/GlobalSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,6 @@ public static class GlobalSettings

private static LogConfiguration logConfiguration = LogConfiguration.None;

/// <summary>
/// Returns all the optional features that were compiled into
/// libgit2.
/// </summary>
/// <returns>A <see cref="BuiltInFeatures"/> enumeration.</returns>
[Obsolete("This method will be removed in the next release. Use Version.Features instead.")]
public static BuiltInFeatures Features()
{
return Version.Features;
}

/// <summary>
/// Returns information related to the current LibGit2Sharp
/// library.
Expand Down
165 changes: 0 additions & 165 deletions LibGit2Sharp/Index.cs
Original file line number Diff line number Diff line change
Expand Up @@ -127,149 +127,6 @@ IEnumerator IEnumerable.GetEnumerator()

#endregion

/// <summary>
/// Promotes to the staging area the latest modifications of a file in the working directory (addition, updation or removal).
///
/// If this path is ignored by configuration then it will not be staged unless <see cref="StageOptions.IncludeIgnored"/> is unset.
/// </summary>
/// <param name="path">The path of the file within the working directory.</param>
/// <param name="stageOptions">If set, determines how paths will be staged.</param>
[Obsolete("This method will be removed in the next release. Use IRepository.Stage() instead.")]
public virtual void Stage(string path, StageOptions stageOptions = null)
{
repo.Stage(path, stageOptions);
}

/// <summary>
/// Promotes to the staging area the latest modifications of a collection of files in the working directory (addition, updation or removal).
///
/// Any paths (even those listed explicitly) that are ignored by configuration will not be staged unless <see cref="StageOptions.IncludeIgnored"/> is unset.
/// </summary>
/// <param name="paths">The collection of paths of the files within the working directory.</param>
/// <param name="stageOptions">If set, determines how paths will be staged.</param>
[Obsolete("This method will be removed in the next release. Use IRepository.Stage() instead.")]
public virtual void Stage(IEnumerable<string> paths, StageOptions stageOptions = null)
{
repo.Stage(paths, stageOptions);
}

/// <summary>
/// Removes from the staging area all the modifications of a file since the latest commit (addition, updation or removal).
/// </summary>
/// <param name="path">The path of the file within the working directory.</param>
/// <param name="explicitPathsOptions">
/// If set, the passed <paramref name="path"/> will be treated as explicit paths.
/// Use these options to determine how unmatched explicit paths should be handled.
/// </param>
[Obsolete("This method will be removed in the next release. Use IRepository.Unstage() instead.")]
public virtual void Unstage(string path, ExplicitPathsOptions explicitPathsOptions = null)
{
repo.Unstage(path, explicitPathsOptions);
}

/// <summary>
/// Removes from the staging area all the modifications of a collection of file since the latest commit (addition, updation or removal).
/// </summary>
/// <param name="paths">The collection of paths of the files within the working directory.</param>
/// <param name="explicitPathsOptions">
/// If set, the passed <paramref name="paths"/> will be treated as explicit paths.
/// Use these options to determine how unmatched explicit paths should be handled.
/// </param>
[Obsolete("This method will be removed in the next release. Use IRepository.Unstage() instead.")]
public virtual void Unstage(IEnumerable<string> paths, ExplicitPathsOptions explicitPathsOptions = null)
{
repo.Unstage(paths, explicitPathsOptions);
}

/// <summary>
/// Moves and/or renames a file in the working directory and promotes the change to the staging area.
/// </summary>
/// <param name="sourcePath">The path of the file within the working directory which has to be moved/renamed.</param>
/// <param name="destinationPath">The target path of the file within the working directory.</param>
[Obsolete("This method will be removed in the next release. Use IRepository.Move() instead.")]
public virtual void Move(string sourcePath, string destinationPath)
{
repo.Move(new[] { sourcePath }, new[] { destinationPath });
}

/// <summary>
/// Moves and/or renames a collection of files in the working directory and promotes the changes to the staging area.
/// </summary>
/// <param name="sourcePaths">The paths of the files within the working directory which have to be moved/renamed.</param>
/// <param name="destinationPaths">The target paths of the files within the working directory.</param>
[Obsolete("This method will be removed in the next release. Use IRepository.Move() instead.")]
public virtual void Move(IEnumerable<string> sourcePaths, IEnumerable<string> destinationPaths)
{
repo.Move(sourcePaths, destinationPaths);
}

/// <summary>
/// Removes a file from the staging area, and optionally removes it from the working directory as well.
/// <para>
/// If the file has already been deleted from the working directory, this method will only deal
/// with promoting the removal to the staging area.
/// </para>
/// <para>
/// The default behavior is to remove the file from the working directory as well.
/// </para>
/// <para>
/// When not passing a <paramref name="explicitPathsOptions"/>, the passed path will be treated as
/// a pathspec. You can for example use it to pass the relative path to a folder inside the working directory,
/// so that all files beneath this folders, and the folder itself, will be removed.
/// </para>
/// </summary>
/// <param name="path">The path of the file within the working directory.</param>
/// <param name="removeFromWorkingDirectory">True to remove the file from the working directory, False otherwise.</param>
/// <param name="explicitPathsOptions">
/// If set, the passed <paramref name="path"/> will be treated as an explicit path.
/// Use these options to determine how unmatched explicit paths should be handled.
/// </param>
[Obsolete("This method will be removed in the next release. Use IRepository.Remove() instead.")]
public virtual void Remove(string path, bool removeFromWorkingDirectory = true, ExplicitPathsOptions explicitPathsOptions = null)
{
repo.Remove(new[] { path }, removeFromWorkingDirectory, explicitPathsOptions);
}

/// <summary>
/// Removes a collection of fileS from the staging, and optionally removes them from the working directory as well.
/// <para>
/// If a file has already been deleted from the working directory, this method will only deal
/// with promoting the removal to the staging area.
/// </para>
/// <para>
/// The default behavior is to remove the files from the working directory as well.
/// </para>
/// <para>
/// When not passing a <paramref name="explicitPathsOptions"/>, the passed paths will be treated as
/// a pathspec. You can for example use it to pass the relative paths to folders inside the working directory,
/// so that all files beneath these folders, and the folders themselves, will be removed.
/// </para>
/// </summary>
/// <param name="paths">The collection of paths of the files within the working directory.</param>
/// <param name="removeFromWorkingDirectory">True to remove the files from the working directory, False otherwise.</param>
/// <param name="explicitPathsOptions">
/// If set, the passed <paramref name="paths"/> will be treated as explicit paths.
/// Use these options to determine how unmatched explicit paths should be handled.
/// </param>
[Obsolete("This method will be removed in the next release. Use IRepository.Remove() instead.")]
public virtual void Remove(IEnumerable<string> paths, bool removeFromWorkingDirectory = true, ExplicitPathsOptions explicitPathsOptions = null)
{
repo.Remove(paths, removeFromWorkingDirectory, explicitPathsOptions);
}

/// <summary>
/// Replaces entries in the staging area with entries from the specified tree.
/// <para>
/// This overwrites all existing state in the staging area.
/// </para>
/// </summary>
/// <param name="source">The <see cref="Tree"/> to read the entries from.</param>
[Obsolete("This method will be removed in the next release. Use Replace instead.")]
public virtual void Reset(Tree source)
{
Replace(source);
}

/// <summary>
/// Replaces entries in the staging area with entries from the specified tree.
/// <para>
Expand Down Expand Up @@ -312,28 +169,6 @@ private void UpdatePhysicalIndex()
Proxy.git_index_write(handle);
}

/// <summary>
/// Retrieves the state of a file in the working directory, comparing it against the staging area and the latest commmit.
/// </summary>
/// <param name="filePath">The relative path within the working directory to the file.</param>
/// <returns>A <see cref="FileStatus"/> representing the state of the <paramref name="filePath"/> parameter.</returns>
[Obsolete("This method will be removed in the next release. Use IRepository.RetrieveStatus() instead.")]
public virtual FileStatus RetrieveStatus(string filePath)
{
return repo.RetrieveStatus(filePath);
}

/// <summary>
/// Retrieves the state of all files in the working directory, comparing them against the staging area and the latest commmit.
/// </summary>
/// <param name="options">If set, the options that control the status investigation.</param>
/// <returns>A <see cref="RepositoryStatus"/> holding the state of all the files.</returns>
[Obsolete("This method will be removed in the next release. Use IRepository.RetrieveStatus() instead.")]
public virtual RepositoryStatus RetrieveStatus(StatusOptions options = null)
{
return repo.RetrieveStatus(options);
}

internal void Replace(TreeChanges changes)
{
foreach (TreeEntryChanges treeEntryChanges in changes)
Expand Down
11 changes: 0 additions & 11 deletions LibGit2Sharp/Reference.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,6 @@ public abstract class Reference : IEquatable<Reference>, IBelongToARepository
protected Reference()
{ }

/// <summary>
/// Initializes a new instance of the <see cref="Reference"/> class.
/// </summary>
/// <param name="canonicalName">The canonical name.</param>
/// <param name="targetIdentifier">The target identifier.</param>
[Obsolete("This ctor will be removed in a future release.")]
protected Reference(string canonicalName, string targetIdentifier)
: this(null, canonicalName, targetIdentifier)
{
}

/// <remarks>
/// This would be protected+internal, were that supported by C#.
/// Do not use except in subclasses.
Expand Down
28 changes: 0 additions & 28 deletions LibGit2Sharp/ReferenceCollection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -142,34 +142,6 @@ public virtual void Remove(Reference reference)
Proxy.git_reference_remove(repo.Handle, reference.CanonicalName);
}

/// <summary>
/// Rename an existing reference with a new name, and update the reflog
/// </summary>
/// <param name="reference">The reference to rename.</param>
/// <param name="newName">The new canonical name.</param>
/// <param name="signature">Identity used for updating the reflog.</param>
/// <param name="logMessage">Message added to the reflog.</param>
/// <param name="allowOverwrite">True to allow silent overwriting a potentially existing reference, false otherwise.</param>
/// <returns>A new <see cref="Reference"/>.</returns>
[Obsolete("This method will be removed in the next release. Please use Rename() instead.")]
public virtual Reference Move(Reference reference, string newName, Signature signature, string logMessage = null, bool allowOverwrite = false)
{
return Rename(reference, newName, signature, logMessage, allowOverwrite);
}

/// <summary>
/// Rename an existing reference with a new name
/// </summary>
/// <param name="reference">The reference to rename.</param>
/// <param name="newName">The new canonical name.</param>
/// <param name="allowOverwrite">True to allow silent overwriting a potentially existing reference, false otherwise.</param>
/// <returns>A new <see cref="Reference"/>.</returns>
[Obsolete("This method will be removed in the next release. Please use Rename() instead.")]
public virtual Reference Move(Reference reference, string newName, bool allowOverwrite = false)
{
return Rename(reference, newName, null, null, allowOverwrite);
}

/// <summary>
/// Rename an existing reference with a new name, and update the reflog
/// </summary>
Expand Down
17 changes: 0 additions & 17 deletions LibGit2Sharp/ReferenceCollectionExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -124,23 +124,6 @@ public static Reference UpdateTarget(this ReferenceCollection refsColl, Referenc
return UpdateTarget(refsColl, directRef, objectish, null, null);
}

/// <summary>
/// Rename an existing reference with a new name
/// </summary>
/// <param name="currentName">The canonical name of the reference to rename.</param>
/// <param name="newName">The new canonical name.</param>
/// <param name="signature">The identity used for updating the reflog</param>
/// <param name="logMessage">The optional message to log in the <see cref="ReflogCollection"/></param>
/// <param name="allowOverwrite">True to allow silent overwriting a potentially existing reference, false otherwise.</param>
/// <param name="refsColl">The <see cref="ReferenceCollection"/> being worked with.</param>
/// <returns>A new <see cref="Reference"/>.</returns>
[Obsolete("This method will be removed in the next release. Please use Rename() instead.")]
public static Reference Move(this ReferenceCollection refsColl, string currentName, string newName,
Signature signature = null, string logMessage = null, bool allowOverwrite = false)
{
return refsColl.Rename(currentName, newName, signature, logMessage, allowOverwrite);
}

/// <summary>
/// Rename an existing reference with a new name
/// </summary>
Expand Down
13 changes: 0 additions & 13 deletions LibGit2Sharp/Repository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -961,19 +961,6 @@ internal T RegisterForCleanup<T>(T disposable) where T : IDisposable
return disposable;
}

/// <summary>
/// Gets the current LibGit2Sharp version.
/// <para>
/// The format of the version number is as follows:
/// <para>Major.Minor.Patch-LibGit2Sharp_abbrev_hash-libgit2_abbrev_hash (x86|amd64 - features)</para>
/// </para>
/// </summary>
[Obsolete("This property will be removed in the next release. Use GlobalSettings.Version instead.")]
public static string Version
{
get { return GlobalSettings.Version.ToString(); }
}

/// <summary>
/// Merges changes from commit into the branch pointed at by HEAD.
/// </summary>
Expand Down