notes: extract parse_notes_merge_strategy to notes-utils
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
4d03dd18f0
commit
93efcad317
@ -796,17 +796,7 @@ static int merge(int argc, const char **argv, const char *prefix)
|
||||
o.remote_ref = remote_ref.buf;
|
||||
|
||||
if (strategy) {
|
||||
if (!strcmp(strategy, "manual"))
|
||||
o.strategy = NOTES_MERGE_RESOLVE_MANUAL;
|
||||
else if (!strcmp(strategy, "ours"))
|
||||
o.strategy = NOTES_MERGE_RESOLVE_OURS;
|
||||
else if (!strcmp(strategy, "theirs"))
|
||||
o.strategy = NOTES_MERGE_RESOLVE_THEIRS;
|
||||
else if (!strcmp(strategy, "union"))
|
||||
o.strategy = NOTES_MERGE_RESOLVE_UNION;
|
||||
else if (!strcmp(strategy, "cat_sort_uniq"))
|
||||
o.strategy = NOTES_MERGE_RESOLVE_CAT_SORT_UNIQ;
|
||||
else {
|
||||
if (parse_notes_merge_strategy(strategy, &o.strategy)) {
|
||||
error("Unknown -s/--strategy: %s", strategy);
|
||||
usage_with_options(git_notes_merge_usage, options);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user