X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=notes-merge.h;h=168a6724cd873602e3da1ff3b7e2cc67a5b240ae;hb=3c1ed90ec3973404ffcff99103faa5b863889f98;hp=55ef3d957f2c3d586b96d4f1e93964034cafa105;hpb=809f38c8abacdbeb7015fdeef03931568c7fddda;p=git.git diff --git a/notes-merge.h b/notes-merge.h index 55ef3d957..168a6724c 100644 --- a/notes-merge.h +++ b/notes-merge.h @@ -11,13 +11,14 @@ enum notes_merge_verbosity { struct notes_merge_options { const char *local_ref; const char *remote_ref; - const char *commit_msg; + struct strbuf commit_msg; int verbosity; enum { NOTES_MERGE_RESOLVE_MANUAL = 0, NOTES_MERGE_RESOLVE_OURS, NOTES_MERGE_RESOLVE_THEIRS, - NOTES_MERGE_RESOLVE_UNION + NOTES_MERGE_RESOLVE_UNION, + NOTES_MERGE_RESOLVE_CAT_SORT_UNIQ } strategy; unsigned has_worktree:1; }; @@ -71,4 +72,27 @@ int notes_merge(struct notes_merge_options *o, struct notes_tree *local_tree, unsigned char *result_sha1); +/* + * Finalize conflict resolution from an earlier notes_merge() + * + * The given notes tree 'partial_tree' must be the notes_tree corresponding to + * the given 'partial_commit', the partial result commit created by a previous + * call to notes_merge(). + * + * This function will add the (now resolved) notes in .git/NOTES_MERGE_WORKTREE + * to 'partial_tree', and create a final notes merge commit, the SHA1 of which + * will be stored in 'result_sha1'. + */ +int notes_merge_commit(struct notes_merge_options *o, + struct notes_tree *partial_tree, + struct commit *partial_commit, + unsigned char *result_sha1); + +/* + * Abort conflict resolution from an earlier notes_merge() + * + * Removes the notes merge worktree in .git/NOTES_MERGE_WORKTREE. + */ +int notes_merge_abort(struct notes_merge_options *o); + #endif