Move copy_note_for_rewrite + friends from builtin/notes.c to notes-utils.c
[git] / notes-utils.h
1 #ifndef NOTES_UTILS_H
2 #define NOTES_UTILS_H
3
4 #include "notes.h"
5
6 void commit_notes(struct notes_tree *t, const char *msg);
7
8 struct notes_rewrite_cfg {
9         struct notes_tree **trees;
10         const char *cmd;
11         int enabled;
12         combine_notes_fn combine;
13         struct string_list *refs;
14         int refs_from_env;
15         int mode_from_env;
16 };
17
18 struct notes_rewrite_cfg *init_copy_notes_for_rewrite(const char *cmd);
19 int copy_note_for_rewrite(struct notes_rewrite_cfg *c,
20                           const unsigned char *from_obj, const unsigned char *to_obj);
21 void finish_copy_notes_for_rewrite(struct notes_rewrite_cfg *c, const char *msg);
22
23 #endif