summaryrefslogtreecommitdiff
path: root/builtin/cat-file.c
diff options
context:
space:
mode:
authorLibravatar Nguyễn Thái Ngọc Duy <pclouds@gmail.com>2018-09-21 17:57:22 +0200
committerLibravatar Junio C Hamano <gitster@pobox.com>2018-09-21 09:48:10 -0700
commit6afaf807859bd671a3f8e9101952e648a1a5e1a9 (patch)
treea952ca9617248345985fb272781b612a9690f7ba /builtin/cat-file.c
parentblame.c: rename "repo" argument to "r" (diff)
downloadtgif-6afaf807859bd671a3f8e9101952e648a1a5e1a9.tar.xz
diff.c: remove the_index dependency in textconv() functions
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/cat-file.c')
-rw-r--r--builtin/cat-file.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/builtin/cat-file.c b/builtin/cat-file.c
index 64ec1745ab..8d97c84725 100644
--- a/builtin/cat-file.c
+++ b/builtin/cat-file.c
@@ -113,7 +113,8 @@ static int cat_one_file(int opt, const char *exp_type, const char *obj_name,
die("git cat-file --textconv %s: <object> must be <sha1:path>",
obj_name);
- if (textconv_object(path, obj_context.mode, &oid, 1, &buf, &size))
+ if (textconv_object(the_repository, path, obj_context.mode,
+ &oid, 1, &buf, &size))
break;
/* else fallthrough */
@@ -305,7 +306,8 @@ static void print_object_or_die(struct batch_options *opt, struct expand_data *d
oid_to_hex(oid), data->rest);
} else if (opt->cmdmode == 'c') {
enum object_type type;
- if (!textconv_object(data->rest, 0100644, oid,
+ if (!textconv_object(the_repository,
+ data->rest, 0100644, oid,
1, &contents, &size))
contents = read_object_file(oid,
&type,