Skip to content

Commit f7ef64b

Browse files
derrickstoleegitster
authored andcommitted
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 <[email protected]> Reviewed-by: Elijah Newren <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 3450a30 commit f7ef64b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

merge-recursive.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -522,6 +522,8 @@ static struct string_list *get_unmerged(struct index_state *istate)
522522

523523
unmerged->strdup_strings = 1;
524524

525+
/* TODO: audit for interaction with sparse-index. */
526+
ensure_full_index(istate);
525527
for (i = 0; i < istate->cache_nr; i++) {
526528
struct string_list_item *item;
527529
struct stage_data *e;

0 commit comments

Comments
 (0)