diff options
Diffstat (limited to 'examples/progress')
-rw-r--r-- | examples/progress/main.go | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/examples/progress/main.go b/examples/progress/main.go index e0e4c1d..46ff57a 100644 --- a/examples/progress/main.go +++ b/examples/progress/main.go @@ -12,20 +12,17 @@ func main() { url := os.Args[1] directory := os.Args[2] - r, err := git.NewFilesystemRepository(directory) - CheckIfError(err) - - // as git does, when you make a clone, pull or some other operations, the - // server sends information via the sideband, this information can being - // collected provinding a io.Writer to the repository - r.Progress = os.Stdout - // Clone the given repository to the given directory Info("git clone %s %s", url, directory) - err = r.Clone(&git.CloneOptions{ + _, err := git.PlainClone(directory, false, &git.CloneOptions{ URL: url, Depth: 1, + + // as git does, when you make a clone, pull or some other operations the + // server sends information via the sideband, this information can being + // collected provinding a io.Writer to the CloneOptions options + Progress: os.Stdout, }) CheckIfError(err) |