Skip to content

Commit b78ea5f

Browse files
pcloudsgitster
authored andcommitted
diff.c: reduce implicit dependency on the_index
diff and textconv code has so widespread use that it's hard to simply update their api and all call sites at once because it would result in a big patch. For now reduce the_index references to two places: diff_setup() and fill_textconv(). Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 92a1bf5 commit b78ea5f

File tree

8 files changed

+161
-112
lines changed

8 files changed

+161
-112
lines changed

builtin/reset.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ static int read_from_tree(const struct pathspec *pathspec,
159159
opt.format_callback = update_index_from_diff;
160160
opt.format_callback_data = &intent_to_add;
161161
opt.flags.override_submodule_config = 1;
162+
opt.repo = the_repository;
162163

163164
if (do_diff_cache(tree_oid, &opt))
164165
return 1;

0 commit comments

Comments
 (0)