summaryrefslogtreecommitdiff
path: root/diff.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2019-01-04 13:33:33 -0800
committerJunio C Hamano <gitster@pobox.com>2019-01-04 13:33:33 -0800
commitcde555480b95c4311819dc1f7a38cc856a9aed23 (patch)
treeafa74222656ad1c41fd10e48a7c8d40f484b87b2 /diff.c
parent3b2f8a02fa9a9e68d5215828e1d97bb4f6996976 (diff)
parent36e7ed69de2c07a0214e79bde45714b92ac30ff2 (diff)
downloadgit-cde555480b95c4311819dc1f7a38cc856a9aed23.tar.gz
Merge branch 'nd/the-index'
More codepaths become aware of working with in-core repository instance other than the default "the_repository". * nd/the-index: (22 commits) rebase-interactive.c: remove the_repository references rerere.c: remove the_repository references pack-*.c: remove the_repository references pack-check.c: remove the_repository references notes-cache.c: remove the_repository references line-log.c: remove the_repository reference diff-lib.c: remove the_repository references delta-islands.c: remove the_repository references cache-tree.c: remove the_repository references bundle.c: remove the_repository references branch.c: remove the_repository reference bisect.c: remove the_repository reference blame.c: remove implicit dependency the_repository sequencer.c: remove implicit dependency on the_repository sequencer.c: remove implicit dependency on the_index transport.c: remove implicit dependency on the_index notes-merge.c: remove implicit dependency the_repository notes-merge.c: remove implicit dependency on the_index list-objects.c: reduce the_repository references list-objects-filter.c: remove implicit dependency on the_index ...
Diffstat (limited to 'diff.c')
-rw-r--r--diff.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/diff.c b/diff.c
index dc9965e836..15556c190d 100644
--- a/diff.c
+++ b/diff.c
@@ -3313,14 +3313,14 @@ void diff_set_mnemonic_prefix(struct diff_options *options, const char *a, const
options->b_prefix = b;
}
-struct userdiff_driver *get_textconv(struct index_state *istate,
+struct userdiff_driver *get_textconv(struct repository *r,
struct diff_filespec *one)
{
if (!DIFF_FILE_VALID(one))
return NULL;
- diff_filespec_load_driver(one, istate);
- return userdiff_get_textconv(one->driver);
+ diff_filespec_load_driver(one, r->index);
+ return userdiff_get_textconv(r, one->driver);
}
static void builtin_diff(const char *name_a,
@@ -3369,8 +3369,8 @@ static void builtin_diff(const char *name_a,
}
if (o->flags.allow_textconv) {
- textconv_one = get_textconv(o->repo->index, one);
- textconv_two = get_textconv(o->repo->index, two);
+ textconv_one = get_textconv(o->repo, one);
+ textconv_two = get_textconv(o->repo, two);
}
/* Never use a non-valid filename anywhere if at all possible */
@@ -6434,7 +6434,7 @@ int textconv_object(struct repository *r,
df = alloc_filespec(path);
fill_filespec(df, oid, oid_valid, mode);
- textconv = get_textconv(r->index, df);
+ textconv = get_textconv(r, df);
if (!textconv) {
free_filespec(df);
return 0;