11 * Create new notes commit from the given notes tree
13 * Properties of the created commit:
14 * - tree: the result of converting t to a tree object with write_notes_tree().
15 * - parents: the given parents OR (if NULL) the commit referenced by t->ref.
16 * - author/committer: the default determined by commit_tree().
17 * - commit message: msg
19 * The resulting commit SHA1 is stored in result_sha1.
21 void create_notes_commit(struct repository
*r
,
23 struct commit_list
*parents
,
24 const char *msg
, size_t msg_len
,
25 struct object_id
*result_oid
);
27 void commit_notes(struct repository
*r
, struct notes_tree
*t
, const char *msg
);
29 enum notes_merge_strategy
{
30 NOTES_MERGE_RESOLVE_MANUAL
= 0,
31 NOTES_MERGE_RESOLVE_OURS
,
32 NOTES_MERGE_RESOLVE_THEIRS
,
33 NOTES_MERGE_RESOLVE_UNION
,
34 NOTES_MERGE_RESOLVE_CAT_SORT_UNIQ
37 struct notes_rewrite_cfg
{
38 struct notes_tree
**trees
;
41 combine_notes_fn combine
;
42 struct string_list
*refs
;
47 int parse_notes_merge_strategy(const char *v
, enum notes_merge_strategy
*s
);
48 struct notes_rewrite_cfg
*init_copy_notes_for_rewrite(const char *cmd
);
49 int copy_note_for_rewrite(struct notes_rewrite_cfg
*c
,
50 const struct object_id
*from_obj
, const struct object_id
*to_obj
);
51 void finish_copy_notes_for_rewrite(struct repository
*r
,
52 struct notes_rewrite_cfg
*c
,