Skip to content

Commit 48b3c7d

Browse files
derrickstoleegitster
authored andcommitted
difftool: ensure full index
Before iterating over all cache entries, ensure that a sparse index has been expanded to a full one to avoid unexpected behavior. Signed-off-by: Derrick Stolee <[email protected]> Reviewed-by: Elijah Newren <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent cb8388d commit 48b3c7d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

builtin/difftool.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -584,6 +584,9 @@ static int run_dir_diff(const char *extcmd, int symlinks, const char *prefix,
584584
setenv("GIT_DIFFTOOL_DIRDIFF", "true", 1);
585585
rc = run_command_v_opt(helper_argv, flags);
586586

587+
/* TODO: audit for interaction with sparse-index. */
588+
ensure_full_index(&wtindex);
589+
587590
/*
588591
* If the diff includes working copy files and those
589592
* files were modified during the diff, then the changes

0 commit comments

Comments
 (0)