diff options
author | Derrick Stolee <dstolee@microsoft.com> | 2021-04-01 03:49:56 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-04-14 22:47:37 +0200 |
commit | f7ef64be0cda36e5188cfc712f61ba7279311b70 (patch) | |
tree | fc9f6c4c27624980dc20877713afbcbc345402b8 /merge-recursive.c | |
parent | entry: ensure full index (diff) | |
download | git-f7ef64be0cda36e5188cfc712f61ba7279311b70.tar.xz git-f7ef64be0cda36e5188cfc712f61ba7279311b70.zip |
merge-recursive: ensure full index
Before iterating over all cache entries, ensure that a sparse index is
expanded to a full index 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>
Diffstat (limited to 'merge-recursive.c')
-rw-r--r-- | merge-recursive.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/merge-recursive.c b/merge-recursive.c index b8de7a704e..91d8597728 100644 --- a/merge-recursive.c +++ b/merge-recursive.c @@ -522,6 +522,8 @@ static struct string_list *get_unmerged(struct index_state *istate) unmerged->strdup_strings = 1; + /* TODO: audit for interaction with sparse-index. */ + ensure_full_index(istate); for (i = 0; i < istate->cache_nr; i++) { struct string_list_item *item; struct stage_data *e; |