From 7f944e264ebe2fcf9a2c228a9fc9463ab3274d39 Mon Sep 17 00:00:00 2001 From: Nguyễn Thái Ngọc Duy Date: Mon, 13 Aug 2018 18:14:21 +0200 Subject: convert.c: remove an implicit dependency on the_index MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Make the convert API take an index_state instead of assuming the_index in convert.c. All external call sites are converted blindly to keep the patch simple and retain current behavior. Individual call sites may receive further updates to use the right index instead of the_index. Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- entry.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'entry.c') diff --git a/entry.c b/entry.c index b5d1d3cf23..b2381fd9f6 100644 --- a/entry.c +++ b/entry.c @@ -266,7 +266,7 @@ static int write_entry(struct cache_entry *ce, const struct submodule *sub; if (ce_mode_s_ifmt == S_IFREG) { - struct stream_filter *filter = get_stream_filter(ce->name, + struct stream_filter *filter = get_stream_filter(&the_index, ce->name, &ce->oid); if (filter && !streaming_write_entry(ce, path, filter, @@ -314,14 +314,14 @@ static int write_entry(struct cache_entry *ce, * Convert from git internal format to working tree format */ if (dco && dco->state != CE_NO_DELAY) { - ret = async_convert_to_working_tree(ce->name, new_blob, + ret = async_convert_to_working_tree(&the_index, ce->name, new_blob, size, &buf, dco); if (ret && string_list_has_string(&dco->paths, ce->name)) { free(new_blob); goto delayed; } } else - ret = convert_to_working_tree(ce->name, new_blob, size, &buf); + ret = convert_to_working_tree(&the_index, ce->name, new_blob, size, &buf); if (ret) { free(new_blob); -- cgit v1.3