mirror of
https://github.com/git/git.git
synced 2025-12-12 20:36:24 +01:00
convert.c: remove an implicit dependency on the_index
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 <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
7a400a2c02
commit
7f944e264e
@@ -79,7 +79,7 @@ void *object_file_to_archive(const struct archiver_args *args,
|
||||
size_t size = 0;
|
||||
|
||||
strbuf_attach(&buf, buffer, *sizep, *sizep + 1);
|
||||
convert_to_working_tree(path, buf.buf, buf.len, &buf);
|
||||
convert_to_working_tree(&the_index, path, buf.buf, buf.len, &buf);
|
||||
if (commit)
|
||||
format_subst(commit, buf.buf, buf.len, &buf);
|
||||
buffer = strbuf_detach(&buf, &size);
|
||||
|
||||
Reference in New Issue
Block a user