notes: extract enum notes_merge_strategy to notes-utils.h
A future patch will extract parsing of the --strategy string into a helper function in notes.c and will require the enumeration definition. Signed-off-by: Jacob Keller <jacob.keller@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jacob Keller committed
Aug 17, 2015 at 14:33 UTC
4d03dd18f0860d4052fab5ce7779e4bba302e5fc
2 files changed
+11
-7
notes-merge.h
+3
-7
@@ -1,6 +1,8 @@
1
#ifndef NOTES_MERGE_H
2
#define NOTES_MERGE_H
3
4
+#include "notes-utils.h"
5
+
6
#define NOTES_MERGE_WORKTREE "NOTES_MERGE_WORKTREE"
7
8
enum notes_merge_verbosity {
@@ -13,13 +15,7 @@ struct notes_merge_options {
15
const char *remote_ref;
16
struct strbuf commit_msg;
17
int verbosity;
16
- enum {
17
- NOTES_MERGE_RESOLVE_MANUAL = 0,
18
- NOTES_MERGE_RESOLVE_OURS,
19
- NOTES_MERGE_RESOLVE_THEIRS,
20
- NOTES_MERGE_RESOLVE_UNION,
21
- NOTES_MERGE_RESOLVE_CAT_SORT_UNIQ
22
- } strategy;
18
+ enum notes_merge_strategy strategy;
19
unsigned has_worktree:1;
20
};
21
notes-utils.h
+8
@@ -19,6 +19,14 @@ void create_notes_commit(struct notes_tree *t, struct commit_list *parents,
19
20
void commit_notes(struct notes_tree *t, const char *msg);
21
22
+enum notes_merge_strategy {
23
+ NOTES_MERGE_RESOLVE_MANUAL = 0,
24
+ NOTES_MERGE_RESOLVE_OURS,
25
+ NOTES_MERGE_RESOLVE_THEIRS,
26
+ NOTES_MERGE_RESOLVE_UNION,
27
+ NOTES_MERGE_RESOLVE_CAT_SORT_UNIQ
28
+};
29
+
30
struct notes_rewrite_cfg {
31
struct notes_tree **trees;
32
const char *cmd;