summaryrefslogtreecommitdiff
path: root/sha1_file.c
diff options
context:
space:
mode:
Diffstat (limited to 'sha1_file.c')
-rw-r--r--sha1_file.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sha1_file.c b/sha1_file.c
index 59a4ed2..a900b28 100644
--- a/sha1_file.c
+++ b/sha1_file.c
@@ -7,6 +7,7 @@
* creation etc.
*/
#include "cache.h"
+#include "config.h"
#include "string-list.h"
#include "lockfile.h"
#include "delta.h"
@@ -3546,7 +3547,7 @@ static int index_mem(unsigned char *sha1, void *buf, size_t size,
*/
if ((type == OBJ_BLOB) && path) {
struct strbuf nbuf = STRBUF_INIT;
- if (convert_to_git(path, buf, size, &nbuf,
+ if (convert_to_git(&the_index, path, buf, size, &nbuf,
write_object ? safe_crlf : SAFE_CRLF_FALSE)) {
buf = strbuf_detach(&nbuf, &size);
re_allocated = 1;
@@ -3580,7 +3581,7 @@ static int index_stream_convert_blob(unsigned char *sha1, int fd,
assert(path);
assert(would_convert_to_git_filter_fd(path));
- convert_to_git_filter_fd(path, fd, &sbuf,
+ convert_to_git_filter_fd(&the_index, path, fd, &sbuf,
write_object ? safe_crlf : SAFE_CRLF_FALSE);
if (write_object)
@@ -3668,7 +3669,7 @@ int index_fd(unsigned char *sha1, int fd, struct stat *st,
else if (!S_ISREG(st->st_mode))
ret = index_pipe(sha1, fd, type, path, flags);
else if (st->st_size <= big_file_threshold || type != OBJ_BLOB ||
- (path && would_convert_to_git(path)))
+ (path && would_convert_to_git(&the_index, path)))
ret = index_core(sha1, fd, xsize_t(st->st_size), type, path,
flags);
else