diff: convert fill_filespec to struct object_id
Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
94a0097a41
commit
f9704c2d82
@ -302,7 +302,7 @@ static char *grab_blob(const struct object_id *oid, unsigned int mode,
|
||||
return xcalloc(1, 1);
|
||||
} else if (textconv) {
|
||||
struct diff_filespec *df = alloc_filespec(path);
|
||||
fill_filespec(df, oid->hash, 1, mode);
|
||||
fill_filespec(df, oid, 1, mode);
|
||||
*size = fill_textconv(textconv, df, &blob);
|
||||
free_filespec(df);
|
||||
} else {
|
||||
@ -1022,7 +1022,7 @@ static void show_patch_diff(struct combine_diff_path *elem, int num_parent,
|
||||
&result_size, NULL, NULL);
|
||||
} else if (textconv) {
|
||||
struct diff_filespec *df = alloc_filespec(elem->path);
|
||||
fill_filespec(df, null_sha1, 0, st.st_mode);
|
||||
fill_filespec(df, &null_oid, 0, st.st_mode);
|
||||
result_size = fill_textconv(textconv, df, &result);
|
||||
free_filespec(df);
|
||||
} else if (0 <= (fd = open(elem->path, O_RDONLY))) {
|
||||
|
Reference in New Issue
Block a user