From aacf7cd43422a5c1408df3b2052d2cbbb02dd707 Mon Sep 17 00:00:00 2001 From: Brandon Ording Date: Sun, 24 Nov 2024 01:36:29 -0500 Subject: [PATCH] Add a CloneOptions constructor that takes a FetchOptions --- LibGit2Sharp/CloneOptions.cs | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/LibGit2Sharp/CloneOptions.cs b/LibGit2Sharp/CloneOptions.cs index a315d76fc..12d47c9f3 100644 --- a/LibGit2Sharp/CloneOptions.cs +++ b/LibGit2Sharp/CloneOptions.cs @@ -4,12 +4,23 @@ namespace LibGit2Sharp { /// - /// Options to define clone behaviour + /// Options to define clone behavior /// public sealed class CloneOptions : IConvertableToGitCheckoutOpts { /// - /// Creates default for a non-bare clone + /// Creates with specified for a non-bare clone. + /// + /// The fetch options to use. + public CloneOptions(FetchOptions fetchOptions) : this() + { + Ensure.ArgumentNotNull(fetchOptions, "fetchOptions"); + + FetchOptions = fetchOptions; + } + + /// + /// Creates default for a non-bare clone. /// public CloneOptions() {