blob: b823943f2d68c732a60bc31da0355d3d0e07def2 [file] [log] [blame]
Máximo Cuadros579d1ac2016-02-16 12:22:251// Package git is a low level and highly extensible git client library for
2// reading repositories from git servers. It is written in Go from scratch,
3// without any C dependencies.
4//
5// We have been following the open/close principle in its design to facilitate
6// extensions.
Máximo Cuadros86fa7612016-02-16 16:21:007//
8// Small example extracting the commits from a repository:
9// func ExampleBasic_printCommits() {
10// r, err := git.NewRepository("https://github.com/src-d/go-git", nil)
11// if err != nil {
12// panic(err)
13// }
14//
15// if err := r.Pull("origin", "refs/heads/master"); err != nil {
16// panic(err)
17// }
18//
19// iter := r.Commits()
20// defer iter.Close()
21//
22// for {
23// commit, err := iter.Next()
24// if err != nil {
25// if err == io.EOF {
26// break
27// }
28//
29// panic(err)
30// }
31//
32// fmt.Println(commit)
Máximo Cuadros1931dfb2016-02-16 16:31:0933// }
Máximo Cuadros86fa7612016-02-16 16:21:0034// }
Máximo Cuadros579d1ac2016-02-16 12:22:2535package git