This patchset makes more config.c functions handle arbitrary repos and use that to remove an add_to_alternates_memory() call in submodule-config.c. This should hopefully benefit performance and memory. Matheus Tavares (2): config: allow config_with_options() to handle any repo submodule: pass repo instead of adding to alternates list Documentation/technical/api-config.txt | 5 +++- config.c | 26 +++++++++---------- config.h | 16 ++++++++---- .../coccinelle/the_repository.pending.cocci | 11 ++++++++ submodule-config.c | 9 +++---- 5 files changed, 42 insertions(+), 25 deletions(-) -- 2.22.0