I tested this series some more and found a silly bug. Let me know if I should just send v9 instead. ----- >8 --------- >8 --------- >8 --------- >8 --------- >8 ---- Subject: [PATCH] submodule-config.c: remove accidental pointer reuse List entries allocated by traverse_tree_submodules() are sharing the .name_entry pointer, but each of them needs their own pointer. Fix this. Signed-off-by: Glen Choo <chooglen@xxxxxxxxxx> --- submodule-config.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/submodule-config.c b/submodule-config.c index 24b8d1a700..c9f54bc72d 100644 --- a/submodule-config.c +++ b/submodule-config.c @@ -757,7 +757,8 @@ static void traverse_tree_submodules(struct repository *r, if (S_ISGITLINK(name_entry->mode) && is_tree_submodule_active(r, root_tree, tree_path)) { st_entry = xmalloc(sizeof(*st_entry)); - st_entry->name_entry = name_entry; + st_entry->name_entry = xmalloc(sizeof(*st_entry->name_entry)); + *st_entry->name_entry = *name_entry; st_entry->submodule = submodule_from_path(r, root_tree, tree_path); st_entry->repo = xmalloc(sizeof(*st_entry->repo)); -- 2.35.0.263.gb82422642f-goog