Example #1
0
 public static void Clone(string url, string path)
 {
     var command = new NGit.Api.CloneCommand();
     command.SetURI(url);
     command.SetDirectory(new Sharpen.FilePath(path));
     var result = command.Call();
 }
Example #2
0
        public static void Clone(string url, string path)
        {
            var command = new NGit.Api.CloneCommand();

            command.SetURI(url);
            command.SetDirectory(new Sharpen.FilePath(path));
            var result = command.Call();
        }
Example #3
0
        public void CanClone()
        {
            if(Directory.Exists(Path.Combine(ResourcesDir, "Clone")))
                Directory.Delete(Path.Combine(ResourcesDir, "Clone"),true);

            var cmd = new NGit.Api.CloneCommand();
            cmd.SetURI(Path.Combine(ResourcesDir, "RemoteRepo"));
            cmd.SetDirectory(Path.Combine(ResourcesDir, "Clone"));

            var git = cmd.Call();

            Assert.IsNotNull(git.GetRepository());
        }
Example #4
0
        public void CanClone()
        {
            if (Directory.Exists(Path.Combine(ResourcesDir, "Clone")))
            {
                Directory.Delete(Path.Combine(ResourcesDir, "Clone"), true);
            }

            var cmd = new NGit.Api.CloneCommand();

            cmd.SetURI(Path.Combine(ResourcesDir, "RemoteRepo"));
            cmd.SetDirectory(Path.Combine(ResourcesDir, "Clone"));

            var git = cmd.Call();

            Assert.IsNotNull(git.GetRepository());
        }