diff --git a/src/Git/Repository.cs b/src/Git/Repository.cs
index d0bccb04..39a30766 100644
--- a/src/Git/Repository.cs
+++ b/src/Git/Repository.cs
@@ -412,18 +412,22 @@ namespace SourceGit.Git {
///
/// Remote repository URL
/// Folder to clone into
- /// Local name
+ /// Remote name
+ /// Local name
+ /// Additional parameters
///
///
- public static bool Clone(string url, string folder, string rName, string lName, Action onProgress) {
+ public static bool Clone(string url, string folder, string rName, string lName, string extra, Action onProgress) {
string RemoteName;
if (rName != null) {
RemoteName = $" --origin {rName}";
} else {
- RemoteName = null;
+ RemoteName = "";
}
- var errs = RunCommand(folder, $"-c credential.helper=manager clone --progress --verbose {RemoteName} --recurse-submodules {url} {lName}", line => {
+ if (extra == null) extra = "";
+
+ var errs = RunCommand(folder, $"-c credential.helper=manager clone --progress --verbose {RemoteName} --recurse-submodules {extra} {url} {lName}", line => {
if (line != null) onProgress?.Invoke(line);
}, true);
diff --git a/src/Resources/Locales/en_US.xaml b/src/Resources/Locales/en_US.xaml
index 6db0cd9c..8be16e7f 100644
--- a/src/Resources/Locales/en_US.xaml
+++ b/src/Resources/Locales/en_US.xaml
@@ -65,6 +65,8 @@
Repository name. Optional.
Remote Name :
Remote name. Optional.
+ Extra Parameters :
+ Additional arguments to clone repository. Optional.
INFORMATION
AUTHOR
diff --git a/src/Resources/Locales/zh_CN.xaml b/src/Resources/Locales/zh_CN.xaml
index a7071c4d..b0121cec 100644
--- a/src/Resources/Locales/zh_CN.xaml
+++ b/src/Resources/Locales/zh_CN.xaml
@@ -65,6 +65,8 @@
本地仓库目录的名字,选填
远程名 :
远程的名字,选填
+ 额外参数 :
+ 其他克隆参数,选填
基本信息
修改者
diff --git a/src/UI/Clone.xaml b/src/UI/Clone.xaml
index 24691f98..abff5f00 100644
--- a/src/UI/Clone.xaml
+++ b/src/UI/Clone.xaml
@@ -6,7 +6,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:helpers="clr-namespace:SourceGit.Helpers"
mc:Ignorable="d"
- Width="500" Height="224">
+ Width="500" Height="256">
@@ -15,6 +15,7 @@
+
@@ -68,18 +69,23 @@
VerticalContentAlignment="Center"
Height="24"
helpers:TextBoxHelper.Placeholder="{StaticResource Text.Clone.LocalName.Placeholder}"
- Text="{Binding LocalName, ElementName=me, Mode=TwoWay}">
-
+ Text="{Binding LocalName, ElementName=me, Mode=TwoWay}"/>
-
+ Text="{Binding RemoteName, ElementName=me, Mode=TwoWay}"/>
-
+
+
+
+
diff --git a/src/UI/Clone.xaml.cs b/src/UI/Clone.xaml.cs
index c3debd0a..33f8c069 100644
--- a/src/UI/Clone.xaml.cs
+++ b/src/UI/Clone.xaml.cs
@@ -33,6 +33,11 @@ namespace SourceGit.UI {
///
public string RemoteName { get; set; }
+ ///
+ /// Additional parameters
+ ///
+ public string AdditionalParam { get; set; }
+
///
/// Constructor.
///
@@ -87,7 +92,7 @@ namespace SourceGit.UI {
popup.Lock();
var succ = await Task.Run(() => {
- return Git.Repository.Clone(RemoteUri, ParentFolder, rName, repoName, popup.UpdateStatus);
+ return Git.Repository.Clone(RemoteUri, ParentFolder, rName, repoName, AdditionalParam, popup.UpdateStatus);
});
if (succ) {