From a33e0b2a77d7010ba8bf0e025fffaf98f464a938 Mon Sep 17 00:00:00 2001 From: Brandon Williams Date: Mon, 12 Jun 2017 15:13:56 -0700 Subject: convert: convert renormalize_buffer to take an index Signed-off-by: Brandon Williams Signed-off-by: Junio C Hamano --- convert.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'convert.c') diff --git a/convert.c b/convert.c index 600d11e73f..4097f521f2 100644 --- a/convert.c +++ b/convert.c @@ -1,3 +1,4 @@ +#define NO_THE_INDEX_COMPATIBILITY_MACROS #include "cache.h" #include "attr.h" #include "run-command.h" @@ -1165,14 +1166,15 @@ int convert_to_working_tree(const char *path, const char *src, size_t len, struc return convert_to_working_tree_internal(path, src, len, dst, 0); } -int renormalize_buffer(const char *path, const char *src, size_t len, struct strbuf *dst) +int renormalize_buffer(const struct index_state *istate, const char *path, + const char *src, size_t len, struct strbuf *dst) { int ret = convert_to_working_tree_internal(path, src, len, dst, 1); if (ret) { src = dst->buf; len = dst->len; } - return ret | convert_to_git(&the_index, path, src, len, dst, SAFE_CRLF_RENORMALIZE); + return ret | convert_to_git(istate, path, src, len, dst, SAFE_CRLF_RENORMALIZE); } /***************************************************************** -- cgit v1.3-5-g9baa