diff options
| author | Carlos Martín Nieto <[email protected]> | 2013-03-05 21:47:55 +0100 |
|---|---|---|
| committer | Carlos Martín Nieto <[email protected]> | 2013-03-05 21:47:55 +0100 |
| commit | 93ab5a1c3e81a988523b716befce2555353396e2 (patch) | |
| tree | eee499cc976a20ab0aa9f064a42f24c3085b26c8 /repository.go | |
| parent | 439f7acf2865af07f970b8bfe2691b70eca7c973 (diff) | |
Bring back the RevWalk
Diffstat (limited to 'repository.go')
| -rw-r--r-- | repository.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/repository.go b/repository.go index 3b845e7..755926e 100644 --- a/repository.go +++ b/repository.go @@ -81,6 +81,18 @@ func (v *Repository) LookupCommit(o *Oid) (*Commit, error) { return commit, nil } +func (v *Repository) Walk() (*RevWalk, error) { + walk := new(RevWalk) + ecode := C.git_revwalk_new(&walk.ptr, v.ptr) + if ecode < 0 { + return nil, LastError() + } + + walk.repo = v + runtime.SetFinalizer(walk, freeRevWalk) + return walk, nil +} + /* TODO func (v *Repository) Commit( refname string, author, committer *Signature, |
