aboutsummaryrefslogtreecommitdiffstats
path: root/doc.go
blob: 681ef7de5586cd5b55dd922889e19469b2a79897 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// Package git is a low level and highly extensible git client library for
// reading repositories from git servers.  It is written in Go from scratch,
// without any C dependencies.
//
// We have been following the open/close principle in its design to facilitate
// 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)
//    }
//
//    if err := r.Pull("origin", "refs/heads/master"); err != nil {
//    	panic(err)
//    }
//
//    iter := r.Commits()
//    defer iter.Close()
//
//    for {
//    	commit, err := iter.Next()
//    	if err != nil {
//    		if err == io.EOF {
//    			break
//    		}
//
//    		panic(err)
//    	}
//
//    	fmt.Println(commit)
//    }
//  }
package git // import "gopkg.in/src-d/go-git.v3"