summaryrefslogtreecommitdiff
path: root/rebase.go
diff options
context:
space:
mode:
authorezwiebel <[email protected]>2016-08-07 16:33:06 +1000
committerezwiebel <[email protected]>2016-08-07 17:48:18 +1000
commita62a8c3b92eeb14055d30608ac7d3243bcfba701 (patch)
tree7ecf05a60377f8a8bb7604d102d1818f263dc115 /rebase.go
parentb1a9de8037e4260dcd840db38e2e16473cdddcb6 (diff)
Add operation OperationCount() service and enrich UTs
Diffstat (limited to 'rebase.go')
-rw-r--r--rebase.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/rebase.go b/rebase.go
index 3e7da53..fb3d612 100644
--- a/rebase.go
+++ b/rebase.go
@@ -139,6 +139,11 @@ func (rebase *Rebase) Finish() error {
return nil
}
+// OperationCount gets the count of rebase operations that are to be applied.
+func (rebase *Rebase) OperationCount() uint {
+ return uint(C.git_rebase_operation_entrycount(rebase.ptr))
+}
+
//Free frees the Rebase object and underlying git_rebase C pointer.
func (rebase *Rebase) Free() {
runtime.SetFinalizer(rebase, nil)
@@ -150,3 +155,13 @@ func newRebaseFromC(ptr *C.git_rebase) *Rebase {
runtime.SetFinalizer(rebase, (*Rebase).Free)
return rebase
}
+
+/* TODO -- Add last wrapper services and manage rebase_options
+
+int git_rebase_abort(git_rebase *rebase);
+int git_rebase_init_options(git_rebase_options *opts, unsigned int version);
+int git_rebase_open(git_rebase **out, git_repository *repo, const git_rebase_options *opts);
+git_rebase_operation * git_rebase_operation_byindex(git_rebase *rebase, size_t idx);
+size_t git_rebase_operation_current(git_rebase *rebase);
+
+*/