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>
This commit is contained in:

committed by
Junio C Hamano

parent
a470beea39
commit
6afaf80785
@ -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,
|
||||
|
Reference in New Issue
Block a user