diff options
Diffstat (limited to 'builtin/merge-recursive.c')
-rw-r--r-- | builtin/merge-recursive.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/builtin/merge-recursive.c b/builtin/merge-recursive.c index d8875d5892..3a64f5d0bd 100644 --- a/builtin/merge-recursive.c +++ b/builtin/merge-recursive.c @@ -1,7 +1,11 @@ -#include "cache.h" +#include "builtin.h" #include "commit.h" #include "tag.h" #include "merge-recursive.h" +#include "xdiff-interface.h" + +static const char builtin_merge_recursive_usage[] = + "git %s <base>... -- <head> <remote> ..."; static const char *better_branch_name(const char *branch) { @@ -29,7 +33,7 @@ int cmd_merge_recursive(int argc, const char **argv, const char *prefix) o.subtree_shift = ""; if (argc < 4) - usagef("%s <base>... -- <head> <remote> ...", argv[0]); + usagef(builtin_merge_recursive_usage, argv[0]); for (i = 1; i < argc; ++i) { const char *arg = argv[i]; @@ -37,15 +41,7 @@ int cmd_merge_recursive(int argc, const char **argv, const char *prefix) if (!prefixcmp(arg, "--")) { if (!arg[2]) break; - if (!strcmp(arg+2, "ours")) - o.recursive_variant = MERGE_RECURSIVE_OURS; - else if (!strcmp(arg+2, "theirs")) - o.recursive_variant = MERGE_RECURSIVE_THEIRS; - else if (!strcmp(arg+2, "subtree")) - o.subtree_shift = ""; - else if (!prefixcmp(arg+2, "subtree=")) - o.subtree_shift = arg + 10; - else + if (parse_merge_opt(&o, arg + 2)) die("Unknown option %s", arg); continue; } |