Skip to content

Commit

Permalink
Merge pull request #21721 from JuliaLang/ksh/cloneex
Browse files Browse the repository at this point in the history
Add examples for clone
  • Loading branch information
kshyatt authored May 6, 2017
2 parents 85c53be + c4ed32e commit 45b2c33
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions base/libgit2/libgit2.jl
Original file line number Diff line number Diff line change
Expand Up @@ -510,6 +510,16 @@ The keyword arguments are:
repository.
Equivalent to `git clone [-b <branch>] [--bare] <repo_url> <repo_path>`.
# 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="",
Expand Down

0 comments on commit 45b2c33

Please sign in to comment.