summaryrefslogtreecommitdiff
path: root/sha1_file.c
diff options
context:
space:
mode:
authorBrandon Williams <bmwill@google.com>2017-06-12 22:13:55 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-06-13 18:40:51 (GMT)
commit82b474e025e89cfa294e81611c81355a73dc23a2 (patch)
tree7e0114fa1a11212629ff9c47a95a59fdb69222bd /sha1_file.c
parentd6c41c20e688a1b284b92d92320ba56f639688de (diff)
downloadgit-82b474e025e89cfa294e81611c81355a73dc23a2.zip
git-82b474e025e89cfa294e81611c81355a73dc23a2.tar.gz
git-82b474e025e89cfa294e81611c81355a73dc23a2.tar.bz2
convert: convert convert_to_git to take an index
Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'sha1_file.c')
-rw-r--r--sha1_file.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sha1_file.c b/sha1_file.c
index ab09241..feb227a 100644
--- a/sha1_file.c
+++ b/sha1_file.c
@@ -3546,7 +3546,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;
@@ -3668,7 +3668,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