summaryrefslogtreecommitdiff
path: root/walk.go
diff options
context:
space:
mode:
authorVicent Martí <[email protected]>2013-09-17 08:03:06 -0700
committerVicent Martí <[email protected]>2013-09-17 08:03:06 -0700
commitb5d41971082c9dd5b21c8fca54aa9f12d53f2027 (patch)
tree0280a0e5148bff28de858393bdfc1e1420d3b799 /walk.go
parentef5fc378703bb4a0da2f9558237f1652b68431ec (diff)
parentb5aca803db4cf9adce0a037cc5ccc47c4c045510 (diff)
Merge pull request #39 from libgit2/goify-consts
Goify consts
Diffstat (limited to 'walk.go')
-rw-r--r--walk.go11
1 files changed, 6 insertions, 5 deletions
diff --git a/walk.go b/walk.go
index 216eb65..6525db1 100644
--- a/walk.go
+++ b/walk.go
@@ -13,11 +13,12 @@ import (
// RevWalk
+type SortType uint
const (
- SORT_NONE = C.GIT_SORT_NONE
- SORT_TOPOLOGICAL = C.GIT_SORT_TOPOLOGICAL
- SORT_TIME = C.GIT_SORT_TIME
- SORT_REVERSE = C.GIT_SORT_REVERSE
+ SortNone SortType = C.GIT_SORT_NONE
+ SortTopological = C.GIT_SORT_TOPOLOGICAL
+ SortTime = C.GIT_SORT_TIME
+ SortReverse = C.GIT_SORT_REVERSE
)
type RevWalk struct {
@@ -81,7 +82,7 @@ func (v *RevWalk) Iterate(fun RevWalkIterator) (err error) {
return nil
}
-func (v *RevWalk) Sorting(sm uint) {
+func (v *RevWalk) Sorting(sm SortType) {
C.git_revwalk_sorting(v.ptr, C.uint(sm))
}