path: root/apply.c
diff options
authorNguyễn Thái Ngọc Duy <>2018-08-13 16:14:21 (GMT)
committerJunio C Hamano <>2018-08-13 21:14:42 (GMT)
commit7f944e264ebe2fcf9a2c228a9fc9463ab3274d39 (patch)
treeb745e284c241468980b72f7bfd7038dce8757eab /apply.c
parent7a400a2c0270f2085b70690e4ddbfd8d141e69ca (diff)
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 <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'apply.c')
1 files changed, 1 insertions, 1 deletions
diff --git a/apply.c b/apply.c
index 2594927..2476f06 100644
--- a/apply.c
+++ b/apply.c
@@ -4335,7 +4335,7 @@ static int try_create_file(const char *path, unsigned int mode, const char *buf,
if (fd < 0)
return 1;
- if (convert_to_working_tree(path, buf, size, &nbuf)) {
+ if (convert_to_working_tree(&the_index, path, buf, size, &nbuf)) {
size = nbuf.len;
buf = nbuf.buf;