From 4d03dd18f0860d4052fab5ce7779e4bba302e5fc Mon Sep 17 00:00:00 2001 From: Jacob Keller Date: Mon, 17 Aug 2015 14:33:30 -0700 Subject: 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 Signed-off-by: Junio C Hamano diff --git a/notes-merge.h b/notes-merge.h index 1d01f6a..0d89056 100644 --- a/notes-merge.h +++ b/notes-merge.h @@ -1,6 +1,8 @@ #ifndef NOTES_MERGE_H #define NOTES_MERGE_H +#include "notes-utils.h" + #define NOTES_MERGE_WORKTREE "NOTES_MERGE_WORKTREE" enum notes_merge_verbosity { @@ -13,13 +15,7 @@ struct notes_merge_options { const char *remote_ref; struct strbuf commit_msg; int verbosity; - enum { - NOTES_MERGE_RESOLVE_MANUAL = 0, - NOTES_MERGE_RESOLVE_OURS, - NOTES_MERGE_RESOLVE_THEIRS, - NOTES_MERGE_RESOLVE_UNION, - NOTES_MERGE_RESOLVE_CAT_SORT_UNIQ - } strategy; + enum notes_merge_strategy strategy; unsigned has_worktree:1; }; diff --git a/notes-utils.h b/notes-utils.h index 890ddb3..db5811e 100644 --- a/notes-utils.h +++ b/notes-utils.h @@ -19,6 +19,14 @@ void create_notes_commit(struct notes_tree *t, struct commit_list *parents, void commit_notes(struct notes_tree *t, const char *msg); +enum notes_merge_strategy { + NOTES_MERGE_RESOLVE_MANUAL = 0, + NOTES_MERGE_RESOLVE_OURS, + NOTES_MERGE_RESOLVE_THEIRS, + NOTES_MERGE_RESOLVE_UNION, + NOTES_MERGE_RESOLVE_CAT_SORT_UNIQ +}; + struct notes_rewrite_cfg { struct notes_tree **trees; const char *cmd; -- cgit v0.10.2-6-g49f6