diff options
Diffstat (limited to 'builtin/merge-recursive.c')
-rw-r--r-- | builtin/merge-recursive.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/builtin/merge-recursive.c b/builtin/merge-recursive.c index a4bfd8f..c2ce044 100644 --- a/builtin/merge-recursive.c +++ b/builtin/merge-recursive.c @@ -1,9 +1,10 @@ -#include "cache.h" #include "builtin.h" -#include "commit.h" -#include "tag.h" +#include "advice.h" +#include "gettext.h" +#include "hash.h" #include "merge-recursive.h" -#include "xdiff-interface.h" +#include "object-name.h" +#include "repository.h" static const char builtin_merge_recursive_usage[] = "git %s <base>... -- <head> <remote> ..."; @@ -20,7 +21,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 +50,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; } @@ -58,7 +59,7 @@ int cmd_merge_recursive(int argc, const char **argv, const char *prefix) "Ignoring %s.", "cannot handle more than %d bases. " "Ignoring %s.", - (int)ARRAY_SIZE(bases)-1), + ARRAY_SIZE(bases)-1), (int)ARRAY_SIZE(bases)-1, argv[i]); } if (argc - i != 3) /* "--" "<head>" "<remote>" */ @@ -70,9 +71,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); |