Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2sharp.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Melcher <fixed-term.jan.melcher@de.bosch.com>2014-03-03 18:39:16 +0400
committernulltoken <emeric.fermas@gmail.com>2014-03-17 23:02:37 +0400
commita4fdaa9c10ff1a64f95151371ccbc9b8aeefa08d (patch)
treed875d6be057897709baf1646e7db30c0d3182d6c /LibGit2Sharp/CloneOptions.cs
parent5371324805b626d61995ebd3a414339ba7fa7fd8 (diff)
Refactored Repository.Clone with CloneOptions
Fix #536
Diffstat (limited to 'LibGit2Sharp/CloneOptions.cs')
-rw-r--r--LibGit2Sharp/CloneOptions.cs44
1 files changed, 44 insertions, 0 deletions
diff --git a/LibGit2Sharp/CloneOptions.cs b/LibGit2Sharp/CloneOptions.cs
new file mode 100644
index 00000000..09e513f7
--- /dev/null
+++ b/LibGit2Sharp/CloneOptions.cs
@@ -0,0 +1,44 @@
+using LibGit2Sharp.Handlers;
+
+namespace LibGit2Sharp
+{
+ /// <summary>
+ /// Options to define clone behaviour
+ /// </summary>
+ public sealed class CloneOptions
+ {
+ /// <summary>
+ /// Creates default <see cref="CloneOptions"/> for a non-bare clone
+ /// </summary>
+ public CloneOptions()
+ {
+ Checkout = true;
+ }
+
+ /// <summary>
+ /// True will result in a bare clone, false a full clone.
+ /// </summary>
+ public bool IsBare { get; set; }
+
+ /// <summary>
+ /// If true, the origin's HEAD will be checked out. This only applies
+ /// to non-bare repositories.
+ /// </summary>
+ public bool Checkout { get; set; }
+
+ /// <summary>
+ /// Handler for network transfer and indexing progress information
+ /// </summary>
+ public TransferProgressHandler OnTransferProgress { get; set; }
+
+ /// <summary>
+ /// Handler for checkout progress information
+ /// </summary>
+ public CheckoutProgressHandler OnCheckoutProgress { get; set; }
+
+ /// <summary>
+ /// Credentials to use for user/pass authentication
+ /// </summary>
+ public Credentials Credentials { get; set; }
+ }
+}