1 module deimos.git2.rebase; 2 3 import deimos.git2.annotated_commit; 4 import deimos.git2.checkout; 5 import deimos.git2.common; 6 import deimos.git2.merge; 7 import deimos.git2.oid; 8 import deimos.git2.types; 9 import deimos.git2.util; 10 11 12 extern (C): 13 14 struct git_rebase_options { 15 uint version_; 16 int quiet; 17 int inmemory; 18 const(char)* rewrite_notes_ref; 19 git_merge_options merge_options; 20 git_checkout_options checkout_options; 21 } 22 23 enum git_rebase_operation_t { 24 GIT_REBASE_OPERATION_PICK = 0, 25 GIT_REBASE_OPERATION_REWORD, 26 GIT_REBASE_OPERATION_EDIT, 27 GIT_REBASE_OPERATION_SQUASH, 28 GIT_REBASE_OPERATION_FIXUP, 29 GIT_REBASE_OPERATION_EXEC, 30 } 31 mixin _ExportEnumMembers!git_rebase_operation_t; 32 33 enum GIT_REBASE_OPTIONS_VERSION = 1; 34 enum git_rebase_options GIT_REBASE_OPTIONS_INIT = { 35 GIT_REBASE_OPTIONS_VERSION, 0, 0, null, 36 GIT_MERGE_OPTIONS_INIT, 37 GIT_CHECKOUT_OPTIONS_INIT 38 }; 39 40 enum GIT_REBASE_NO_OPERATION = ulong.max; 41 42 struct git_rebase_operation { 43 git_rebase_operation_t type; 44 const git_oid id; 45 const(char)* exec; 46 } 47 48 int git_rebase_init_options( 49 git_rebase_options *opts, 50 uint version_, 51 ); 52 53 int git_rebase_init( 54 git_rebase **out_, 55 git_repository *repo, 56 const(git_annotated_commit)* branch, 57 const(git_annotated_commit)* upstream, 58 const(git_annotated_commit)* onto, 59 const(git_rebase_options)* opts, 60 ); 61 62 int git_rebase_open( 63 git_rebase **out_, 64 git_repository *repo, 65 const(git_rebase_options)* opts, 66 ); 67 68 size_t git_rebase_operation_entrycount(git_rebase *rebase); 69 size_t git_rebase_operation_current(git_rebase *rebase); 70 git_rebase_operation* git_rebase_operation_byindex( 71 git_rebase *rebase, 72 size_t idx, 73 ); 74 int git_rebase_next(git_rebase_operation **operation, git_rebase *rebase); 75 int git_rebase_inmemory_index(git_index **index, git_rebase *rebase); 76 77 int git_rebase_commit( 78 git_oid *id, 79 git_rebase *rebase, 80 const(git_signature)* author, 81 const(git_signature)* committer, 82 const(char)* message_encoding, 83 const(char)* message, 84 ); 85 86 int git_rebase_abort(git_rebase *rebase); 87 int git_rebase_finish(git_rebase *rebase, const(git_signature)* signature); 88 void git_rebase_free(git_rebase *rebase);