summaryrefslogtreecommitdiff
path: root/diff.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 /diff.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 'diff.c')
-rw-r--r--diff.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/diff.c b/diff.c
index 5275c4b..976a6f9 100644
--- a/diff.c
+++ b/diff.c
@@ -2755,7 +2755,7 @@ static int reuse_worktree_file(const char *name, const unsigned char *sha1, int
* Similarly, if we'd have to convert the file contents anyway, that
* makes the optimization not worthwhile.
*/
- if (!want_file && would_convert_to_git(name))
+ if (!want_file && would_convert_to_git(&the_index, name))
return 0;
len = strlen(name);
@@ -2877,7 +2877,7 @@ int diff_populate_filespec(struct diff_filespec *s, unsigned int flags)
* point if the path requires us to run the content
* conversion.
*/
- if (size_only && !would_convert_to_git(s->path))
+ if (size_only && !would_convert_to_git(&the_index, s->path))
return 0;
/*
@@ -2904,7 +2904,7 @@ int diff_populate_filespec(struct diff_filespec *s, unsigned int flags)
/*
* Convert from working tree format to canonical git format
*/
- if (convert_to_git(s->path, s->data, s->size, &buf, crlf_warn)) {
+ if (convert_to_git(&the_index, s->path, s->data, s->size, &buf, crlf_warn)) {
size_t size = 0;
munmap(s->data, s->size);
s->should_munmap = 0;