libgit2

git_rebase_options

Version:

Rebase options

Use to tell the rebase machinery how to operate.

Signature

typedef struct git_rebase_options { unsigned int version int quiet int inmemory const char *rewrite_notes_ref git_merge_options merge_options git_checkout_options checkout_options git_commit_create_cb commit_create_cb int (*)(git_buf *, git_buf *, const char *, void *) signing_cb void *payload };

Members

unsigned int
version
int
quiet

Used by git_rebase_init, this will instruct other clients working on this rebase that you want a quiet rebase experience, which they may choose to provide in an application-specific manner. This has no effect upon libgit2 directly, but is provided for interoperability between Git tools.

int
inmemory

Used by git_rebase_init, this will begin an in-memory rebase, which will allow callers to step through the rebase operations and commit the rebased changes, but will not rewind HEAD or update the repository to be in a rebasing state. This will not interfere with the working directory (if there is one).

const char *
rewrite_notes_ref

Used by git_rebase_finish, this is the name of the notes reference used to rewrite notes for rebased commits when finishing the rebase; if NULL, the contents of the configuration option notes.rewriteRef is examined, unless the configuration option notes.rewrite.rebase is set to false. If notes.rewriteRef is also NULL, notes will not be rewritten.

merge_options

Options to control how trees are merged during git_rebase_next.

checkout_options

Options to control how files are written during git_rebase_init, git_rebase_next and git_rebase_abort. Note that a minimum strategy of GIT_CHECKOUT_SAFE is defaulted in init and next, and a minimum strategy of GIT_CHECKOUT_FORCE is defaulted in abort to match git semantics.

commit_create_cb

Optional callback that allows users to override commit creation in git_rebase_commit. If specified, users can create their own commit and provide the commit ID, which may be useful for signing commits or otherwise customizing the commit creation.

If this callback returns GIT_PASSTHROUGH, then git_rebase_commit will continue to create the commit.

int (*)(git_buf *, git_buf *, const char *, void *)
signing_cb

If provided, this will be called with the commit content, allowing a signature to be added to the rebase commit. Can be skipped with GIT_PASSTHROUGH. If GIT_PASSTHROUGH is returned, a commit will be made without a signature.

This field is only used when performing git_rebase_commit.

This callback is not invoked if a git_commit_create_cb is specified.

This callback is deprecated; users should provide a creation callback as commit_create_cb that produces a commit buffer, signs it, and commits it.

void *
payload

This will be passed to each of the callbacks in this struct as the last parameter.

Parameter To

Versions