From c4ed32e81f22ea0f5c531a3b62c2104a1fc4f484 Mon Sep 17 00:00:00 2001 From: kshyatt Date: Fri, 5 May 2017 15:54:18 -0700 Subject: [PATCH] Add examples for clone --- base/libgit2/libgit2.jl | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/base/libgit2/libgit2.jl b/base/libgit2/libgit2.jl index ac7dfa7a1683b..789473a4a8101 100644 --- a/base/libgit2/libgit2.jl +++ b/base/libgit2/libgit2.jl @@ -510,6 +510,16 @@ The keyword arguments are: repository. Equivalent to `git clone [-b ] [--bare] `. + +# Examples + +```julia +repo_url = "https://github.com/JuliaLang/Example.jl" +repo1 = LibGit2.clone(repo_url, "test_path") +repo2 = LibGit2.clone(repo_url, "test_path", isbare=true) +julia_url = "https://github.com/JuliaLang/julia" +julia_repo = LibGit2.clone(julia_url, "julia_path", branch="release-0.6") +``` """ function clone(repo_url::AbstractString, repo_path::AbstractString; branch::AbstractString="",