@@ -30,19 +30,32 @@ typedef struct {
3030 unsigned int version ;
3131
3232 /**
33- * Provide a quiet rebase experience; unused by libgit2 but provided for
34- * interoperability with other clients.
33+ * Used by `git_rebase_init`, this will instruct other clients working
34+ * on this rebase that you want a quiet rebase experience, which they
35+ * may choose to provide in an application-specific manner. This has no
36+ * effect upon libgit2 directly, but is provided for interoperability with
37+ * other clients.
3538 */
3639 int quiet ;
3740
3841 /**
39- * Canonical name of the notes reference used to rewrite notes for
40- * rebased commits when finishing the rebase; if NULL, the contents of
41- * the coniguration option `notes.rewriteRef` is examined, unless the
42- * configuration option `notes.rewrite.rebase` is set to false. If
43- * `notes.rewriteRef` is NULL, notes will not be rewritten.
42+ * Used by `git_rebase_finish`, this is the canonical name of the notes
43+ * reference used to rewrite notes for rebased commits when finishing the
44+ * rebase; if NULL, the contents of the coniguration option
45+ * `notes.rewriteRef` is examined, unless the configuration option
46+ * `notes.rewrite.rebase` is set to false. If `notes.rewriteRef` is also
47+ * NULL, notes will not be rewritten.
4448 */
4549 const char * rewrite_notes_ref ;
50+
51+ /**
52+ * Options to control how files are written during `git_rebase_init`,
53+ * `git_checkout_next` and `git_checkout_abort`. Note that a minimum
54+ * strategy of `GIT_CHECKOUT_SAFE` is defaulted in `init` and `next`,
55+ * and a minimum strategy of `GIT_CHECKOUT_FORCE` is defaulted in
56+ * `abort` to match git semantics.
57+ */
58+ git_checkout_options * checkout_options ;
4659} git_rebase_options ;
4760
4861/**
@@ -142,9 +155,7 @@ GIT_EXTERN(int) git_rebase_init_options(
142155 * reachable commits
143156 * @param onto The branch to rebase onto, or NULL to rebase onto the given
144157 * upstream
145- * @param opts Options to specify how rebase is performed
146- * @param checkout_opts Options to specify how the checkout to the `onto`
147- * branch is performed
158+ * @param opts Options to specify how rebase is performed, or NULL
148159 * @return Zero on success; -1 on failure.
149160 */
150161GIT_EXTERN (int ) git_rebase_init (
@@ -153,18 +164,21 @@ GIT_EXTERN(int) git_rebase_init(
153164 const git_annotated_commit * branch ,
154165 const git_annotated_commit * upstream ,
155166 const git_annotated_commit * onto ,
156- const git_rebase_options * opts ,
157- const git_checkout_options * checkout_opts );
167+ const git_rebase_options * opts );
158168
159169/**
160170 * Opens an existing rebase that was previously started by either an
161171 * invocation of `git_rebase_init` or by another client.
162172 *
163173 * @param out Pointer to store the rebase object
164174 * @param repo The repository that has a rebase in-progress
175+ * @param opts Options to specify how rebase is performed
165176 * @return Zero on success; -1 on failure.
166177 */
167- GIT_EXTERN (int ) git_rebase_open (git_rebase * * out , git_repository * repo );
178+ GIT_EXTERN (int ) git_rebase_open (
179+ git_rebase * * out ,
180+ git_repository * repo ,
181+ const git_rebase_options * opts );
168182
169183/**
170184 * Gets the count of rebase operations that are to be applied.
@@ -205,13 +219,11 @@ GIT_EXTERN(git_rebase_operation *) git_rebase_operation_byindex(
205219 *
206220 * @param operation Pointer to store the rebase operation that is to be performed next
207221 * @param rebase The rebase in progress
208- * @param checkout_opts Options to specify how the patch should be checked out
209222 * @return Zero on success; -1 on failure.
210223 */
211224GIT_EXTERN (int ) git_rebase_next (
212225 git_rebase_operation * * operation ,
213- git_rebase * rebase ,
214- git_checkout_options * checkout_opts );
226+ git_rebase * rebase );
215227
216228/**
217229 * Commits the current patch. You must have resolved any conflicts that
@@ -248,28 +260,22 @@ GIT_EXTERN(int) git_rebase_commit(
248260 * and working directory to their state before rebase began.
249261 *
250262 * @param rebase The rebase that is in-progress
251- * @param checkout_opts The checkout options that will be used to influence a
252- * hard reset of the working directory.
253263 * @return Zero on success; GIT_ENOTFOUND if a rebase is not in progress,
254264 * -1 on other errors.
255265 */
256- GIT_EXTERN (int ) git_rebase_abort (
257- git_rebase * rebase ,
258- const git_checkout_options * checkout_opts );
266+ GIT_EXTERN (int ) git_rebase_abort (git_rebase * rebase );
259267
260268/**
261269 * Finishes a rebase that is currently in progress once all patches have
262270 * been applied.
263271 *
264272 * @param rebase The rebase that is in-progress
265273 * @param signature The identity that is finishing the rebase (optional)
266- * @param opts Options to specify how rebase is finished
267274 * @return Zero on success; -1 on error
268275 */
269276GIT_EXTERN (int ) git_rebase_finish (
270277 git_rebase * rebase ,
271- const git_signature * signature ,
272- const git_rebase_options * opts );
278+ const git_signature * signature );
273279
274280/**
275281 * Frees the `git_rebase` object.
0 commit comments