Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'builtin/range-diff.c')
-rw-r--r--builtin/range-diff.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/builtin/range-diff.c b/builtin/range-diff.c
index e2a74efb42..f02cbac087 100644
--- a/builtin/range-diff.c
+++ b/builtin/range-diff.c
@@ -1,9 +1,10 @@
-#include "cache.h"
#include "builtin.h"
+#include "gettext.h"
+#include "object-name.h"
#include "parse-options.h"
#include "range-diff.h"
#include "config.h"
-#include "revision.h"
+#include "repository.h"
static const char * const builtin_range_diff_usage[] = {
N_("git range-diff [<options>] <old-base>..<old-tip> <new-base>..<new-tip>"),
@@ -47,7 +48,7 @@ int cmd_range_diff(int argc, const char **argv, const char *prefix)
repo_diff_setup(the_repository, &diffopt);
- options = parse_options_concat(range_diff_options, diffopt.parseopts);
+ options = add_diff_options(range_diff_options, &diffopt);
argc = parse_options(argc, argv, prefix, options,
builtin_range_diff_usage, PARSE_OPT_KEEP_DASHDASH);
@@ -65,20 +66,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]);