diff options
| author | Edward Thomson <ethomson@microsoft.com> | 2014-09-11 16:47:20 -0400 |
|---|---|---|
| committer | Edward Thomson <ethomson@microsoft.com> | 2014-10-26 22:59:41 -0400 |
| commit | ed2c06a6a1c8725483759782f60531d582d9ec46 (patch) | |
| tree | 33fb1d4506d3dda0b0e6fe9670162f9047954e84 /include/git2/rebase.h | |
| parent | f152f8ac0c6c20bf5e245e79629dc70a913496b1 (diff) | |
| download | libgit2-ed2c06a6a1c8725483759782f60531d582d9ec46.tar.gz | |
git_rebase: iterators for operations
Diffstat (limited to 'include/git2/rebase.h')
| -rw-r--r-- | include/git2/rebase.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/include/git2/rebase.h b/include/git2/rebase.h index 9ffdc4805..b9b0af73b 100644 --- a/include/git2/rebase.h +++ b/include/git2/rebase.h @@ -150,6 +150,33 @@ GIT_EXTERN(int) git_rebase_init( GIT_EXTERN(int) git_rebase_open(git_rebase **out, git_repository *repo); /** + * Gets the count of rebase operations that are to be applied. + * + * @param rebase The in-progress rebase + * @return The number of rebase operations in total + */ +GIT_EXTERN(size_t) git_rebase_operation_entrycount(git_rebase *rebase); + +/** + * Gets the index of the rebase operation that is currently being applied. + * + * @param rebase The in-progress rebase + * @return The index of the rebase operation currently being applied. + */ +GIT_EXTERN(size_t) git_rebase_operation_current(git_rebase *rebase); + +/** + * Gets the rebase operation specified by the given index. + * + * @param rebase The in-progress rebase + * @param idx The index of the rebase operation to retrieve + * @return The rebase operation or NULL if `idx` was out of bounds + */ +GIT_EXTERN(git_rebase_operation *) git_rebase_operation_byindex( + git_rebase *rebase, + size_t idx); + +/** * Performs the next rebase operation and returns the information about it. * If the operation is one that applies a patch (which is any operation except * GIT_REBASE_OPERATION_EXEC) then the patch will be applied and the index and |
