From 82b474e025e89cfa294e81611c81355a73dc23a2 Mon Sep 17 00:00:00 2001 From: Brandon Williams Date: Mon, 12 Jun 2017 15:13:55 -0700 Subject: convert: convert convert_to_git to take an index Signed-off-by: Brandon Williams Signed-off-by: Junio C Hamano --- convert.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'convert.c') diff --git a/convert.c b/convert.c index c09242cec..600d11e73 100644 --- a/convert.c +++ b/convert.c @@ -1084,7 +1084,8 @@ const char *get_convert_attr_ascii(const char *path) return ""; } -int convert_to_git(const char *path, const char *src, size_t len, +int convert_to_git(const struct index_state *istate, + const char *path, const char *src, size_t len, struct strbuf *dst, enum safe_crlf checksafe) { int ret = 0; @@ -1100,7 +1101,7 @@ int convert_to_git(const char *path, const char *src, size_t len, src = dst->buf; len = dst->len; } - ret |= crlf_to_git(&the_index, path, src, len, dst, ca.crlf_action, checksafe); + ret |= crlf_to_git(istate, path, src, len, dst, ca.crlf_action, checksafe); if (ret && dst) { src = dst->buf; len = dst->len; @@ -1171,7 +1172,7 @@ int renormalize_buffer(const char *path, const char *src, size_t len, struct str src = dst->buf; len = dst->len; } - return ret | convert_to_git(path, src, len, dst, SAFE_CRLF_RENORMALIZE); + return ret | convert_to_git(&the_index, path, src, len, dst, SAFE_CRLF_RENORMALIZE); } /***************************************************************** -- cgit v1.2.1