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>
This commit is contained in:
		
				
					committed by
					
						
						Junio C Hamano
					
				
			
			
				
	
			
			
			
						parent
						
							e48ad1b9b1
						
					
				
				
					commit
					4d03dd18f0
				
			@ -1,6 +1,8 @@
 | 
				
			|||||||
#ifndef NOTES_MERGE_H
 | 
					#ifndef NOTES_MERGE_H
 | 
				
			||||||
#define NOTES_MERGE_H
 | 
					#define NOTES_MERGE_H
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include "notes-utils.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define NOTES_MERGE_WORKTREE "NOTES_MERGE_WORKTREE"
 | 
					#define NOTES_MERGE_WORKTREE "NOTES_MERGE_WORKTREE"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
enum notes_merge_verbosity {
 | 
					enum notes_merge_verbosity {
 | 
				
			||||||
@ -13,13 +15,7 @@ struct notes_merge_options {
 | 
				
			|||||||
	const char *remote_ref;
 | 
						const char *remote_ref;
 | 
				
			||||||
	struct strbuf commit_msg;
 | 
						struct strbuf commit_msg;
 | 
				
			||||||
	int verbosity;
 | 
						int verbosity;
 | 
				
			||||||
	enum {
 | 
						enum notes_merge_strategy strategy;
 | 
				
			||||||
		NOTES_MERGE_RESOLVE_MANUAL = 0,
 | 
					 | 
				
			||||||
		NOTES_MERGE_RESOLVE_OURS,
 | 
					 | 
				
			||||||
		NOTES_MERGE_RESOLVE_THEIRS,
 | 
					 | 
				
			||||||
		NOTES_MERGE_RESOLVE_UNION,
 | 
					 | 
				
			||||||
		NOTES_MERGE_RESOLVE_CAT_SORT_UNIQ
 | 
					 | 
				
			||||||
	} strategy;
 | 
					 | 
				
			||||||
	unsigned has_worktree:1;
 | 
						unsigned has_worktree:1;
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -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);
 | 
					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_rewrite_cfg {
 | 
				
			||||||
	struct notes_tree **trees;
 | 
						struct notes_tree **trees;
 | 
				
			||||||
	const char *cmd;
 | 
						const char *cmd;
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user