summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/git2/rebase.h21
1 files changed, 15 insertions, 6 deletions
diff --git a/include/git2/rebase.h b/include/git2/rebase.h
index 4fda1fd2f..ece8b3664 100644
--- a/include/git2/rebase.h
+++ b/include/git2/rebase.h
@@ -142,12 +142,6 @@ typedef struct {
* be populated for operations of type `GIT_REBASE_OPERATION_EXEC`.
*/
const char *exec;
-
- /**
- * The index that is the result of an operation.
- * This is set only for in-memory rebases.
- */
- git_index *index;
} git_rebase_operation;
/**
@@ -248,6 +242,21 @@ GIT_EXTERN(int) git_rebase_next(
git_rebase *rebase);
/**
+ * Gets the index produced by the last operation, which is the result
+ * of `git_rebase_next` and which will be committed by the next
+ * invocation of `git_rebase_commit`. This is useful for resolving
+ * conflicts in an in-memory rebase before committing them. You must
+ * call `git_index_free` when you are finished with this.
+ *
+ * This is only applicable for in-memory rebases; for rebases within
+ * a working directory, the changes were applied to the repository's
+ * index.
+ */
+GIT_EXTERN(int) git_rebase_inmemory_index(
+ git_index **index,
+ git_rebase *rebase);
+
+/**
* Commits the current patch. You must have resolved any conflicts that
* were introduced during the patch application from the `git_rebase_next`
* invocation.