diff options
author | Brandon Williams <bmwill@google.com> | 2017-06-12 15:13:55 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-06-13 11:40:51 -0700 |
commit | 82b474e025e89cfa294e81611c81355a73dc23a2 (patch) | |
tree | 7e0114fa1a11212629ff9c47a95a59fdb69222bd /convert.c | |
parent | convert: convert convert_to_git_filter_fd to take an index (diff) | |
download | tgif-82b474e025e89cfa294e81611c81355a73dc23a2.tar.xz |
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 'convert.c')
-rw-r--r-- | convert.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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); } /***************************************************************** |