diff options
Diffstat (limited to 'builtin/range-diff.c')
| -rw-r--r-- | builtin/range-diff.c | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/builtin/range-diff.c b/builtin/range-diff.c index aecfae12d3..1b33ab66a7 100644 --- a/builtin/range-diff.c +++ b/builtin/range-diff.c @@ -1,9 +1,11 @@ -#include "cache.h" +#define USE_THE_REPOSITORY_VARIABLE #include "builtin.h" +#include "gettext.h" +#include "object-name.h" #include "parse-options.h" #include "range-diff.h" #include "config.h" -#include "revision.h" + static const char * const builtin_range_diff_usage[] = { N_("git range-diff [<options>] <old-base>..<old-tip> <new-base>..<new-tip>"), @@ -12,7 +14,10 @@ N_("git range-diff [<options>] <base> <old-tip> <new-tip>"), NULL }; -int cmd_range_diff(int argc, const char **argv, const char *prefix) +int cmd_range_diff(int argc, + const char **argv, + const char *prefix, + struct repository *repo UNUSED) { struct diff_options diffopt = { NULL }; struct strvec other_arg = STRVEC_INIT; @@ -65,20 +70,20 @@ int cmd_range_diff(int argc, const char **argv, const char *prefix) if (dash_dash == 3 || (dash_dash < 0 && argc > 2 && - !get_oid_committish(argv[0], &oid) && - !get_oid_committish(argv[1], &oid) && - !get_oid_committish(argv[2], &oid))) { + !repo_get_oid_committish(the_repository, argv[0], &oid) && + !repo_get_oid_committish(the_repository, argv[1], &oid) && + !repo_get_oid_committish(the_repository, argv[2], &oid))) { if (dash_dash < 0) ; /* already validated arguments */ - else if (get_oid_committish(argv[0], &oid)) + else if (repo_get_oid_committish(the_repository, argv[0], &oid)) usage_msg_optf(_("not a revision: '%s'"), builtin_range_diff_usage, options, argv[0]); - else if (get_oid_committish(argv[1], &oid)) + else if (repo_get_oid_committish(the_repository, argv[1], &oid)) usage_msg_optf(_("not a revision: '%s'"), builtin_range_diff_usage, options, argv[1]); - else if (get_oid_committish(argv[2], &oid)) + else if (repo_get_oid_committish(the_repository, argv[2], &oid)) usage_msg_optf(_("not a revision: '%s'"), builtin_range_diff_usage, options, argv[2]); |
