Skip to content
This repository was archived by the owner on Sep 11, 2020. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 23 additions & 22 deletions doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,31 @@
// extensions.
//
// Small example extracting the commits from a repository:
// func ExampleBasic_printCommits() {
// r, err := git.NewRepository("https://github.com/src-d/go-git", nil)
// if err != nil {
// panic(err)
// }
// func ExampleBasic_printCommits() {
// r := git.NewMemoryRepository()
// o := &git.CloneOptions{
// URL: "https://github.com/src-d/go-git",
// }
// if err := r.Clone(o); err != nil {
// panic(err)
// }
//
// if err := r.Pull("origin", "refs/heads/master"); err != nil {
// panic(err)
// }
// iter, err := r.Commits()
// if err != nil {
// panic(err)
// }
// defer iter.Close()
//
// iter := r.Commits()
// defer iter.Close()
// for {
// commit, err := iter.Next()
// if err != nil {
// if err == io.EOF {
// break
// }
// panic(err)
// }
//
// for {
// commit, err := iter.Next()
// if err != nil {
// if err == io.EOF {
// break
// }
//
// panic(err)
// }
//
// fmt.Println(commit)
// }
// fmt.Println(commit)
// }
// }
package git // import "gopkg.in/src-d/go-git.v4"