diff options
Diffstat (limited to 'builtin/merge-recursive.c')
-rw-r--r-- | builtin/merge-recursive.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/builtin/merge-recursive.c b/builtin/merge-recursive.c index b9acbf5d34..b9e980384a 100644 --- a/builtin/merge-recursive.c +++ b/builtin/merge-recursive.c @@ -1,8 +1,13 @@ #include "cache.h" #include "builtin.h" +#include "advice.h" #include "commit.h" +#include "gettext.h" +#include "hash.h" #include "tag.h" #include "merge-recursive.h" +#include "object-name.h" +#include "repository.h" #include "xdiff-interface.h" static const char builtin_merge_recursive_usage[] = @@ -20,7 +25,7 @@ static char *better_branch_name(const char *branch) return xstrdup(name ? name : branch); } -int cmd_merge_recursive(int argc, const char **argv, const char *prefix) +int cmd_merge_recursive(int argc, const char **argv, const char *prefix UNUSED) { const struct object_id *bases[21]; unsigned bases_count = 0; @@ -49,7 +54,7 @@ int cmd_merge_recursive(int argc, const char **argv, const char *prefix) } if (bases_count < ARRAY_SIZE(bases)-1) { struct object_id *oid = xmalloc(sizeof(struct object_id)); - if (get_oid(argv[i], oid)) + if (repo_get_oid(the_repository, argv[i], oid)) die(_("could not parse object '%s'"), argv[i]); bases[bases_count++] = oid; } @@ -70,9 +75,9 @@ int cmd_merge_recursive(int argc, const char **argv, const char *prefix) o.branch1 = argv[++i]; o.branch2 = argv[++i]; - if (get_oid(o.branch1, &h1)) + if (repo_get_oid(the_repository, o.branch1, &h1)) die(_("could not resolve ref '%s'"), o.branch1); - if (get_oid(o.branch2, &h2)) + if (repo_get_oid(the_repository, o.branch2, &h2)) die(_("could not resolve ref '%s'"), o.branch2); o.branch1 = better1 = better_branch_name(o.branch1); |