summaryrefslogtreecommitdiff
path: root/builtin/merge-recursive.c
diff options
context:
space:
mode:
authorJonathan Nieder <jrnieder@gmail.com>2010-08-26 05:47:58 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-08-26 16:05:02 (GMT)
commit635a7bb1d807390bedfc1147d2052e8423bcd1e0 (patch)
tree317b28d6a3d042cb3a5e728f62751e905b076535 /builtin/merge-recursive.c
parent7610fa57e63b0acc0a66717fc2d85755634db591 (diff)
downloadgit-635a7bb1d807390bedfc1147d2052e8423bcd1e0.zip
git-635a7bb1d807390bedfc1147d2052e8423bcd1e0.tar.gz
git-635a7bb1d807390bedfc1147d2052e8423bcd1e0.tar.bz2
merge-recursive: expose merge options for builtin merge
There are two very similar blocks of code that recognize options for the "recursive" merge strategy. Unify them. No functional change intended. Cc: Avery Pennarun <apenwarr@gmail.com> Helped-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/merge-recursive.c')
-rw-r--r--builtin/merge-recursive.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/builtin/merge-recursive.c b/builtin/merge-recursive.c
index c2d4677..5a52f3d 100644
--- a/builtin/merge-recursive.c
+++ b/builtin/merge-recursive.c
@@ -37,19 +37,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 (!strcmp(arg+2, "renormalize"))
- o.renormalize = 1;
- else if (!strcmp(arg+2, "no-renormalize"))
- o.renormalize = 0;
- else
+ if (parse_merge_opt(&o, arg + 2))
die("Unknown option %s", arg);
continue;
}