diff options
Diffstat (limited to 'notes-merge.h')
-rw-r--r-- | notes-merge.h | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/notes-merge.h b/notes-merge.h index 49e1b3a0f2..577cfb33cd 100644 --- a/notes-merge.h +++ b/notes-merge.h @@ -9,6 +9,7 @@ enum notes_merge_verbosity { struct notes_merge_options { const char *local_ref; const char *remote_ref; + const char *commit_msg; int verbosity; }; @@ -31,13 +32,20 @@ void create_notes_commit(struct notes_tree *t, struct commit_list *parents, /* * Merge notes from o->remote_ref into o->local_ref * + * The given notes_tree 'local_tree' must be the notes_tree referenced by the + * o->local_ref. This is the notes_tree in which the object-level merge is + * performed. + * * The commits given by the two refs are merged, producing one of the following * outcomes: * * 1. The merge trivially results in an existing commit (e.g. fast-forward or - * already-up-to-date). The SHA1 of the result is written into 'result_sha1' - * and 0 is returned. - * 2. The merge fails. result_sha1 is set to null_sha1, and non-zero returned. + * already-up-to-date). 'local_tree' is untouched, the SHA1 of the result + * is written into 'result_sha1' and 0 is returned. + * 2. The merge successfully completes, producing a merge commit. local_tree + * contains the updated notes tree, the SHA1 of the resulting commit is + * written into 'result_sha1', and 1 is returned. + * 3. The merge fails. result_sha1 is set to null_sha1, and -1 is returned. * * Both o->local_ref and o->remote_ref must be given (non-NULL), but either ref * (although not both) may refer to a non-existing notes ref, in which case @@ -45,6 +53,7 @@ void create_notes_commit(struct notes_tree *t, struct commit_list *parents, * trivially results in what the other ref points to. */ int notes_merge(struct notes_merge_options *o, + struct notes_tree *local_tree, unsigned char *result_sha1); #endif |