Skip to content

Commit 856b422

Browse files
committed
Drop obsolete members after release v0.18.0
1 parent 2f52a40 commit 856b422

8 files changed

+0
-277
lines changed

LibGit2Sharp/Branch.cs

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -224,33 +224,6 @@ public virtual void Checkout()
224224
repo.Checkout(this);
225225
}
226226

227-
/// <summary>
228-
/// Checkout the tip commit of this <see cref="Branch"/> object
229-
/// with a callback for progress reporting. If this commit is the
230-
/// current tip of the branch, will checkout the named branch. Otherwise,
231-
/// will checkout the tip commit as a detached HEAD.
232-
/// </summary>
233-
/// <param name="checkoutModifiers">Options controlling checkout behavior.</param>
234-
/// <param name="onCheckoutProgress">Callback method to report checkout progress updates through.</param>
235-
/// <param name="checkoutNotificationOptions"><see cref="CheckoutNotificationOptions"/> to manage checkout notifications.</param>
236-
[Obsolete("This overload will be removed in the next release. Please use Branch.Checkout(CheckoutOptions, Signature) instead.")]
237-
public virtual void Checkout(CheckoutModifiers checkoutModifiers, CheckoutProgressHandler onCheckoutProgress, CheckoutNotificationOptions checkoutNotificationOptions)
238-
{
239-
var options = new CheckoutOptions
240-
{
241-
CheckoutModifiers = checkoutModifiers,
242-
OnCheckoutProgress = onCheckoutProgress,
243-
};
244-
245-
if (checkoutNotificationOptions != null)
246-
{
247-
options.OnCheckoutNotify = checkoutNotificationOptions.CheckoutNotifyHandler;
248-
options.CheckoutNotifyFlags = checkoutNotificationOptions.NotifyFlags;
249-
}
250-
251-
Checkout(options, null);
252-
}
253-
254227
/// <summary>
255228
/// Checkout the tip commit of this <see cref="Branch"/> object with
256229
/// <see cref="CheckoutOptions"/> parameter specifying checkout

LibGit2Sharp/BranchCollection.cs

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -195,21 +195,6 @@ public virtual Branch Rename(Branch branch, string newName, Signature signature,
195195
return newBranch;
196196
}
197197

198-
/// <summary>
199-
/// Rename an existing local branch
200-
/// </summary>
201-
/// <param name="branch">The current local branch.</param>
202-
/// <param name="newName">The new name the existing branch should bear.</param>
203-
/// <param name="signature">Identity used for updating the reflog</param>
204-
/// <param name="logMessage">Message added to the reflog. If null, the default is "branch: renamed [old] to [new]".</param>
205-
/// <param name="allowOverwrite">True to allow silent overwriting a potentially existing branch, false otherwise.</param>
206-
/// <returns>A new <see cref="Branch"/>.</returns>
207-
[Obsolete("This will be removed in the next release. Please use BranchCollection.Rename(Branch, string, Signature, string, bool) instead.")]
208-
public virtual Branch Move(Branch branch, string newName, Signature signature, string logMessage = null, bool allowOverwrite = false)
209-
{
210-
return Rename(branch, newName, signature, logMessage, allowOverwrite);
211-
}
212-
213198
/// <summary>
214199
/// Rename an existing local branch, using the default reflog message
215200
/// </summary>
@@ -222,19 +207,6 @@ public virtual Branch Rename(Branch branch, string newName, bool allowOverwrite
222207
return Rename(branch, newName, null, null, allowOverwrite);
223208
}
224209

225-
/// <summary>
226-
/// Rename an existing local branch, using the default reflog message
227-
/// </summary>
228-
/// <param name="branch">The current local branch.</param>
229-
/// <param name="newName">The new name the existing branch should bear.</param>
230-
/// <param name="allowOverwrite">True to allow silent overwriting a potentially existing branch, false otherwise.</param>
231-
/// <returns>A new <see cref="Branch"/>.</returns>
232-
[Obsolete("This will be removed in the next release. Please use BranchCollection.Rename(Branch, string, bool) instead.")]
233-
public virtual Branch Move(Branch branch, string newName, bool allowOverwrite = false)
234-
{
235-
return Rename(branch, newName, allowOverwrite);
236-
}
237-
238210
/// <summary>
239211
/// Update properties of a branch.
240212
/// </summary>

LibGit2Sharp/BranchCollectionExtensions.cs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -97,19 +97,5 @@ public static Branch Rename(this BranchCollection branches, string currentName,
9797

9898
return branches.Rename(branch, newName, allowOverwrite);
9999
}
100-
101-
/// <summary>
102-
/// Rename an existing local branch, using the default reflog message
103-
/// </summary>
104-
/// <param name="currentName">The current branch name.</param>
105-
/// <param name="newName">The new name the existing branch should bear.</param>
106-
/// <param name="allowOverwrite">True to allow silent overwriting a potentially existing branch, false otherwise.</param>
107-
/// <param name="branches">The <see cref="BranchCollection"/> being worked with.</param>
108-
/// <returns>A new <see cref="Branch"/>.</returns>
109-
[Obsolete("This will be removed in the next release. Please use BranchCollection.Rename(string, string, bool) instead.")]
110-
public static Branch Move(this BranchCollection branches, string currentName, string newName, bool allowOverwrite = false)
111-
{
112-
return Rename(branches, currentName, newName, allowOverwrite);
113-
}
114100
}
115101
}

LibGit2Sharp/CheckoutNotificationOptions.cs

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -41,40 +41,4 @@ public enum CheckoutNotifyFlags
4141
/// </summary>
4242
Ignored = (1 << 4), /* GIT_CHECKOUT_NOTIFY_IGNORED */
4343
}
44-
45-
/// <summary>
46-
/// Class to specify options and callback on CheckoutNotifications.
47-
/// </summary>
48-
[Obsolete("This class will be removed in the next release. Specify CheckoutNotification options through CheckoutOptions instead.")]
49-
public class CheckoutNotificationOptions
50-
{
51-
/// <summary>
52-
/// Needed for mocking purposes.
53-
/// </summary>
54-
protected CheckoutNotificationOptions()
55-
{
56-
}
57-
58-
/// <summary>
59-
/// The delegate that will be called for files that match the
60-
/// options specified in NotifyFlags.
61-
/// </summary>
62-
public virtual CheckoutNotifyHandler CheckoutNotifyHandler { get; private set; }
63-
64-
/// <summary>
65-
/// The Flags specifying what notifications are reported.
66-
/// </summary>
67-
public virtual CheckoutNotifyFlags NotifyFlags { get; private set; }
68-
69-
/// <summary>
70-
/// Construct the CheckoutNotificationOptions class.
71-
/// </summary>
72-
/// <param name="checkoutNotifyHandler"><see cref="CheckoutNotifyHandler"/> that checkout notifications are reported through.</param>
73-
/// <param name="notifyFlags">The checkout notification type.</param>
74-
public CheckoutNotificationOptions(CheckoutNotifyHandler checkoutNotifyHandler, CheckoutNotifyFlags notifyFlags)
75-
{
76-
CheckoutNotifyHandler = checkoutNotifyHandler;
77-
NotifyFlags = notifyFlags;
78-
}
79-
}
8044
}

LibGit2Sharp/IRepository.cs

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -70,53 +70,6 @@ public interface IRepository : IDisposable
7070
/// </summary>
7171
SubmoduleCollection Submodules { get; }
7272

73-
/// <summary>
74-
/// Checkout the commit pointed at by the tip of the specified <see cref="Branch"/>.
75-
/// <para>
76-
/// If this commit is the current tip of the branch as it exists in the repository, the HEAD
77-
/// will point to this branch. Otherwise, the HEAD will be detached, pointing at the commit sha.
78-
/// </para>
79-
/// </summary>
80-
/// <param name="branch">The <see cref="Branch"/> to check out.</param>
81-
/// <param name="checkoutModifiers"><see cref="CheckoutModifiers"/> controlling checkout behavior.</param>
82-
/// <param name="onCheckoutProgress"><see cref="CheckoutProgressHandler"/> that checkout progress is reported through.</param>
83-
/// <param name="checkoutNotificationOptions"><see cref="CheckoutNotificationOptions"/> to manage checkout notifications.</param>
84-
/// <param name="signature">Identity for use when updating the reflog.</param>
85-
/// <returns>The <see cref="Branch"/> that was checked out.</returns>
86-
[Obsolete("This overload will be removed in the next release. Please use Repository.Checkout(Branch, CheckoutOptions, Signature) instead.")]
87-
Branch Checkout(Branch branch, CheckoutModifiers checkoutModifiers, CheckoutProgressHandler onCheckoutProgress, CheckoutNotificationOptions checkoutNotificationOptions, Signature signature = null);
88-
89-
/// <summary>
90-
/// Checkout the specified branch, reference or SHA.
91-
/// <para>
92-
/// If the committishOrBranchSpec parameter resolves to a branch name, then the checked out HEAD will
93-
/// will point to the branch. Otherwise, the HEAD will be detached, pointing at the commit sha.
94-
/// </para>
95-
/// </summary>
96-
/// <param name="committishOrBranchSpec">A revparse spec for the commit or branch to checkout.</param>
97-
/// <param name="checkoutModifiers">Options controlling checkout behavior.</param>
98-
/// <param name="onCheckoutProgress">Callback method to report checkout progress updates through.</param>
99-
/// <param name="checkoutNotificationOptions"><see cref="CheckoutNotificationOptions"/> to manage checkout notifications.</param>
100-
/// <param name="signature">Identity for use when updating the reflog.</param>
101-
/// <returns>The <see cref="Branch"/> that was checked out.</returns>
102-
[Obsolete("This overload will be removed in the next release. Please use Repository.Checkout(string, CheckoutOptions, Signature) instead.")]
103-
Branch Checkout(string committishOrBranchSpec, CheckoutModifiers checkoutModifiers, CheckoutProgressHandler onCheckoutProgress, CheckoutNotificationOptions checkoutNotificationOptions, Signature signature = null);
104-
105-
/// <summary>
106-
/// Checkout the specified <see cref="LibGit2Sharp.Commit"/>.
107-
/// <para>
108-
/// Will detach the HEAD and make it point to this commit sha.
109-
/// </para>
110-
/// </summary>
111-
/// <param name="commit">The <see cref="LibGit2Sharp.Commit"/> to check out.</param>
112-
/// <param name="checkoutModifiers"><see cref="CheckoutModifiers"/> controlling checkout behavior.</param>
113-
/// <param name="onCheckoutProgress"><see cref="CheckoutProgressHandler"/> that checkout progress is reported through.</param>
114-
/// <param name="checkoutNotificationOptions"><see cref="CheckoutNotificationOptions"/> to manage checkout notifications.</param>
115-
/// <param name="signature">Identity for use when updating the reflog.</param>
116-
/// <returns>The <see cref="Branch"/> that was checked out.</returns>
117-
[Obsolete("This overload will be removed in the next release. Please use Repository.Checkout(Commit, CheckoutOptions, Signature) instead.")]
118-
Branch Checkout(Commit commit, CheckoutModifiers checkoutModifiers, CheckoutProgressHandler onCheckoutProgress, CheckoutNotificationOptions checkoutNotificationOptions, Signature signature = null);
119-
12073
/// <summary>
12174
/// Checkout the commit pointed at by the tip of the specified <see cref="Branch"/>.
12275
/// <para>

LibGit2Sharp/ReferenceCollection.cs

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -327,25 +327,6 @@ public virtual IEnumerable<Reference> FromGlob(string pattern)
327327
.Select(n => this[n]);
328328
}
329329

330-
/// <summary>
331-
/// Determines if the proposed reference name is well-formed.
332-
/// </summary>
333-
/// <para>
334-
/// - Top-level names must contain only capital letters and underscores,
335-
/// and must begin and end with a letter. (e.g. "HEAD", "ORIG_HEAD").
336-
///
337-
/// - Names prefixed with "refs/" can be almost anything. You must avoid
338-
/// the characters '~', '^', ':', '\\', '?', '[', and '*', and the
339-
/// sequences ".." and "@{" which have special meaning to revparse.
340-
/// </para>
341-
/// <param name="canonicalName">The name to be checked.</param>
342-
/// <returns>true is the name is valid; false otherwise.</returns>
343-
[Obsolete("This method will be removed in the next release. Please use Reference.IsValidName(string) instead.")]
344-
public virtual bool IsValidName(string canonicalName)
345-
{
346-
return Reference.IsValidName(canonicalName);
347-
}
348-
349330
/// <summary>
350331
/// Shortcut to return the HEAD reference.
351332
/// </summary>

LibGit2Sharp/RemoteCollection.cs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -126,17 +126,6 @@ public virtual Remote Add(string name, string url, string fetchRefSpec)
126126
}
127127
}
128128

129-
/// <summary>
130-
/// Determines if the proposed remote name is well-formed.
131-
/// </summary>
132-
/// <param name="name">The name to be checked.</param>
133-
/// <returns>true is the name is valid; false otherwise.</returns>
134-
[Obsolete("This method will be removed in the next release. Please use Remote.IsValidName(string) instead.")]
135-
public virtual bool IsValidName(string name)
136-
{
137-
return Remote.IsValidName(name);
138-
}
139-
140129
/// <summary>
141130
/// Deletes the <see cref="Remote"/> with the specified name.
142131
/// </summary>

LibGit2Sharp/Repository.cs

Lines changed: 0 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -577,37 +577,6 @@ public BlameHunkCollection Blame(string path, BlameOptions options = null)
577577
return new BlameHunkCollection(this, Handle, path, options ?? new BlameOptions());
578578
}
579579

580-
/// <summary>
581-
/// Checkout the specified <see cref="Branch"/>, reference or SHA.
582-
/// <para>
583-
/// If the committishOrBranchSpec parameter resolves to a branch name, then the checked out HEAD will
584-
/// will point to the branch. Otherwise, the HEAD will be detached, pointing at the commit sha.
585-
/// </para>
586-
/// </summary>
587-
/// <param name="committishOrBranchSpec">A revparse spec for the commit or branch to checkout.</param>
588-
/// <param name="checkoutModifiers"><see cref="CheckoutModifiers"/> controlling checkout behavior.</param>
589-
/// <param name="onCheckoutProgress"><see cref="CheckoutProgressHandler"/> that checkout progress is reported through.</param>
590-
/// <param name="checkoutNotifications"><see cref="CheckoutNotificationOptions"/> to manage checkout notifications.</param>
591-
/// <param name="signature">Identity for use when updating the reflog.</param>
592-
/// <returns>The <see cref="Branch"/> that was checked out.</returns>
593-
[Obsolete("This overload will be removed in the next release. Please use Repository.Checkout(string, CheckoutOptions, Signature) instead.")]
594-
public Branch Checkout(string committishOrBranchSpec, CheckoutModifiers checkoutModifiers, CheckoutProgressHandler onCheckoutProgress, CheckoutNotificationOptions checkoutNotifications, Signature signature = null)
595-
{
596-
var options = new CheckoutOptions()
597-
{
598-
CheckoutModifiers = checkoutModifiers,
599-
OnCheckoutProgress = onCheckoutProgress
600-
};
601-
602-
if (checkoutNotifications != null)
603-
{
604-
options.OnCheckoutNotify = checkoutNotifications.CheckoutNotifyHandler;
605-
options.CheckoutNotifyFlags = checkoutNotifications.NotifyFlags;
606-
}
607-
608-
return Checkout(committishOrBranchSpec, options, signature);
609-
}
610-
611580
/// <summary>
612581
/// Checkout the specified <see cref="Branch"/>, reference or SHA.
613582
/// <para>
@@ -660,37 +629,6 @@ public Branch Checkout(string committishOrBranchSpec, CheckoutOptions options, S
660629
return Head;
661630
}
662631

663-
/// <summary>
664-
/// Checkout the tip commit of the specified <see cref="Branch"/> object. If this commit is the
665-
/// current tip of the branch, will checkout the named branch. Otherwise, will checkout the tip commit
666-
/// as a detached HEAD.
667-
/// </summary>
668-
/// <param name="branch">The <see cref="Branch"/> to check out.</param>
669-
/// <param name="checkoutModifiers"><see cref="CheckoutModifiers"/> controlling checkout behavior.</param>
670-
/// <param name="onCheckoutProgress"><see cref="CheckoutProgressHandler"/> that checkout progress is reported through.</param>
671-
/// <param name="checkoutNotificationOptions"><see cref="CheckoutNotificationOptions"/> to manage checkout notifications.</param>
672-
/// <param name="signature">Identity for use when updating the reflog.</param>
673-
/// <returns>The <see cref="Branch"/> that was checked out.</returns>
674-
[Obsolete("This overload will be removed in the next release. Please use Repository.Checkout(Branch, CheckoutOptions, Signature) instead.")]
675-
public Branch Checkout(Branch branch, CheckoutModifiers checkoutModifiers, CheckoutProgressHandler onCheckoutProgress, CheckoutNotificationOptions checkoutNotificationOptions, Signature signature = null)
676-
{
677-
Ensure.ArgumentNotNull(branch, "branch");
678-
679-
var options = new CheckoutOptions
680-
{
681-
CheckoutModifiers = checkoutModifiers,
682-
OnCheckoutProgress = onCheckoutProgress,
683-
};
684-
685-
if (checkoutNotificationOptions != null)
686-
{
687-
options.OnCheckoutNotify = checkoutNotificationOptions.CheckoutNotifyHandler;
688-
options.CheckoutNotifyFlags = checkoutNotificationOptions.NotifyFlags;
689-
}
690-
691-
return Checkout(branch, options, signature);
692-
}
693-
694632
/// <summary>
695633
/// Checkout the tip commit of the specified <see cref="Branch"/> object. If this commit is the
696634
/// current tip of the branch, will checkout the named branch. Otherwise, will checkout the tip commit
@@ -727,39 +665,6 @@ public Branch Checkout(Branch branch, CheckoutOptions options, Signature signatu
727665
return Head;
728666
}
729667

730-
/// <summary>
731-
/// Checkout the specified <see cref="LibGit2Sharp.Commit"/>.
732-
/// <para>
733-
/// Will detach the HEAD and make it point to this commit sha.
734-
/// </para>
735-
/// </summary>
736-
/// <param name="commit">The <see cref="LibGit2Sharp.Commit"/> to check out.</param>
737-
/// <param name="checkoutModifiers"><see cref="CheckoutModifiers"/> controlling checkout behavior.</param>
738-
/// <param name="onCheckoutProgress"><see cref="CheckoutProgressHandler"/> that checkout progress is reported through.</param>
739-
/// <param name="checkoutNotificationOptions"><see cref="CheckoutNotificationOptions"/> to manage checkout notifications.</param>
740-
/// <param name="signature">Identity for use when updating the reflog.</param>
741-
/// <returns>The <see cref="Branch"/> that was checked out.</returns>
742-
[Obsolete("This overload will be removed in the next release. Please use Repository.Checkout(Commit, CheckoutOptions, Signature) instead.")]
743-
public Branch Checkout(Commit commit, CheckoutModifiers checkoutModifiers, CheckoutProgressHandler onCheckoutProgress, CheckoutNotificationOptions checkoutNotificationOptions, Signature signature = null)
744-
{
745-
746-
var options = new CheckoutOptions
747-
{
748-
CheckoutModifiers = checkoutModifiers,
749-
OnCheckoutProgress = onCheckoutProgress,
750-
};
751-
752-
if (checkoutNotificationOptions != null)
753-
{
754-
options.OnCheckoutNotify = checkoutNotificationOptions.CheckoutNotifyHandler;
755-
options.CheckoutNotifyFlags = checkoutNotificationOptions.NotifyFlags;
756-
}
757-
758-
Checkout(commit.Tree, options, commit.Id.Sha, commit.Id.Sha, signature);
759-
760-
return Head;
761-
}
762-
763668
/// <summary>
764669
/// Checkout the specified <see cref="LibGit2Sharp.Commit"/>.
765670
/// <para>

0 commit comments

Comments
 (0)