コード例 #1
0
ファイル: Git.cs プロジェクト: loudej/kudu
        private static Executable GetGitExe(string repositoryPath)
        {
            if (!Path.IsPathRooted(repositoryPath))
            {
                repositoryPath = Path.Combine(PathHelper.LocalRepositoriesDir, repositoryPath);
            }

            FileSystemHelpers.EnsureDirectory(repositoryPath);

            var exe = new GitExecutable(repositoryPath);
            exe.SetTraceLevel(2);
            exe.SetHttpVerbose(true);
            exe.SetSSLNoVerify(true);

            return exe;
        }
コード例 #2
0
ファイル: Git.cs プロジェクト: 40a/kudu
 public static string CloneToLocal(string cloneUri, string path = null)
 {
     string repositoryPath = path ?? Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
     Directory.CreateDirectory(repositoryPath);
     var exe = new GitExecutable(repositoryPath, idleTimeout: TimeSpan.FromSeconds(3600));
     exe.SetTraceLevel(2);
     exe.SetHttpVerbose(true);
     exe.SetSSLNoVerify(true);
     GitExecute(exe, "clone \"{0}\" .", cloneUri);
     return repositoryPath;
 }
コード例 #3
0
ファイル: Git.cs プロジェクト: KoprowskiT/kudu
        private static Executable GetGitExe(string repositoryPath, IDictionary<string, string> environments = null)
        {
            if (!Path.IsPathRooted(repositoryPath))
            {
                repositoryPath = Path.Combine(PathHelper.LocalRepositoriesDir, repositoryPath);
            }

            FileSystemHelpers.EnsureDirectory(repositoryPath);

            // Use a really long idle timeout, since it's mostly meaningful when running on server, not client
            var exe = new GitExecutable(repositoryPath, idleTimeout: TimeSpan.FromSeconds(3600));
            exe.SetTraceLevel(2);
            exe.SetHttpVerbose(true);
            exe.SetSSLNoVerify(true);

            if (environments != null)
            {
                foreach (var pair in environments)
                {
                    exe.EnvironmentVariables.Add(pair);
                }
            }

            return exe;
        }
コード例 #4
0
ファイル: Git.cs プロジェクト: dpvreony-forks/kudu
        private static Executable GetGitExe(string repositoryPath, IDictionary<string, string> environments = null)
        {
            if (!Path.IsPathRooted(repositoryPath))
            {
                repositoryPath = Path.Combine(PathHelper.LocalRepositoriesDir, repositoryPath);
            }

            FileSystemHelpers.EnsureDirectory(repositoryPath);

            var exe = new GitExecutable(repositoryPath);
            exe.SetTraceLevel(2);
            exe.SetHttpVerbose(true);
            exe.SetSSLNoVerify(true);

            if (environments != null)
            {
                foreach (var pair in environments)
                {
                    exe.EnvironmentVariables.Add(pair);
                }
            }

            return exe;
        }