Thread (105 messages) 105 messages, 5 authors, 2021-04-13

[PATCH 21/27] merge-recursive: ensure full index

flat view
STALE2024d SUPERSEDED

From: Derrick Stolee via GitGitGadget <hidden>
Date: 2021-03-16 21:18:29
Subsystem: the rest · Maintainer: Linus Torvalds

Status: Superseded by v3 (posted 2021-04-12). [go to v3]

Revision v1 (3 revisions archived).

Revisions (3)
  1. v1 current
  2. v2 [diff against previous]
  3. v3 [diff against previous]
From: Derrick Stolee <redacted>

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 <redacted>
---
 merge-recursive.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/merge-recursive.c b/merge-recursive.c
index b8de7a704eae..7954c7829d27 100644
--- a/merge-recursive.c
+++ b/merge-recursive.c
@@ -522,6 +522,7 @@ static struct string_list *get_unmerged(struct index_state *istate)
 
 	unmerged->strdup_strings = 1;
 
+	ensure_full_index(istate);
 	for (i = 0; i < istate->cache_nr; i++) {
 		struct string_list_item *item;
 		struct stage_data *e;
-- 
gitgitgadget
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help