Skip to content

Commit 4d03dd1

Browse files
jacob-kellergitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent e48ad1b commit 4d03dd1

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

notes-merge.h

+3-7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#ifndef NOTES_MERGE_H
22
#define NOTES_MERGE_H
33

4+
#include "notes-utils.h"
5+
46
#define NOTES_MERGE_WORKTREE "NOTES_MERGE_WORKTREE"
57

68
enum notes_merge_verbosity {
@@ -13,13 +15,7 @@ struct notes_merge_options {
1315
const char *remote_ref;
1416
struct strbuf commit_msg;
1517
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;
2319
unsigned has_worktree:1;
2420
};
2521

notes-utils.h

+8
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,14 @@ void create_notes_commit(struct notes_tree *t, struct commit_list *parents,
1919

2020
void commit_notes(struct notes_tree *t, const char *msg);
2121

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+
2230
struct notes_rewrite_cfg {
2331
struct notes_tree **trees;
2432
const char *cmd;

0 commit comments

Comments
 (0)