mirror of
https://github.com/git/git
synced 2024-08-24 18:26:02 +00:00
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 <dstolee@microsoft.com> Reviewed-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
cb8388df5b
commit
48b3c7da6c
|
@ -584,6 +584,9 @@ static int run_dir_diff(const char *extcmd, int symlinks, const char *prefix,
|
|||
setenv("GIT_DIFFTOOL_DIRDIFF", "true", 1);
|
||||
rc = run_command_v_opt(helper_argv, flags);
|
||||
|
||||
/* TODO: audit for interaction with sparse-index. */
|
||||
ensure_full_index(&wtindex);
|
||||
|
||||
/*
|
||||
* If the diff includes working copy files and those
|
||||
* files were modified during the diff, then the changes
|
||||
|
|
Loading…
Reference in a new issue