diff options
| author | Carlos Martín Nieto <carlosmn@github.com> | 2016-02-16 08:54:43 +0100 |
|---|---|---|
| committer | Carlos Martín Nieto <carlosmn@github.com> | 2016-02-16 08:54:43 +0100 |
| commit | 1aa14921827244da8d0a736fff02b3ea293adf6e (patch) | |
| tree | 437cafaa9d8afc0b59c6b63bd5d5cf068fc52fe7 /include/git2 | |
| parent | 5a296ad07ea5536a0ac2f17921f2839612d838d3 (diff) | |
| parent | f28bae0c380467409515ffd25247f3204dcc4019 (diff) | |
| download | libgit2-1aa14921827244da8d0a736fff02b3ea293adf6e.tar.gz | |
Merge pull request #3615 from ethomson/rebase_bare
rebase: persist a single in-memory index
Diffstat (limited to 'include/git2')
| -rw-r--r-- | include/git2/rebase.h | 21 |
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. |
