Skip to content

Commit

Permalink
Merge pull request #2132 from libgit2/clone-options-ctor
Browse files Browse the repository at this point in the history
Add a CloneOptions constructor that takes a FetchOptions
  • Loading branch information
bording authored Nov 24, 2024
2 parents 17a2dee + aacf7cd commit 0961ea7
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions LibGit2Sharp/CloneOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,23 @@
namespace LibGit2Sharp
{
/// <summary>
/// Options to define clone behaviour
/// Options to define clone behavior
/// </summary>
public sealed class CloneOptions : IConvertableToGitCheckoutOpts
{
/// <summary>
/// Creates default <see cref="CloneOptions"/> for a non-bare clone
/// Creates <see cref="CloneOptions"/> with specified <see cref="FetchOptions"/> for a non-bare clone.
/// </summary>
/// <param name="fetchOptions">The fetch options to use.</param>
public CloneOptions(FetchOptions fetchOptions) : this()
{
Ensure.ArgumentNotNull(fetchOptions, "fetchOptions");

FetchOptions = fetchOptions;
}

/// <summary>
/// Creates default <see cref="CloneOptions"/> for a non-bare clone.
/// </summary>
public CloneOptions()
{
Expand Down

0 comments on commit 0961ea7

Please sign in to comment.