]> git.ipfire.org Git - thirdparty/git.git/blobdiff - submodule.c
submodule.c: sort changed_submodule_names before searching it
[thirdparty/git.git] / submodule.c
index bc48ea3b6836651793fcd76f04ffbca83cad76fe..3c388f85cc63d211856b895a68a569c9a08d5137 100644 (file)
@@ -1283,7 +1283,7 @@ static int get_next_submodule(struct child_process *cp,
                case RECURSE_SUBMODULES_DEFAULT:
                case RECURSE_SUBMODULES_ON_DEMAND:
                        if (!submodule ||
-                           !unsorted_string_list_lookup(
+                           !string_list_lookup(
                                        &changed_submodule_names,
                                        submodule->name))
                                continue;
@@ -1377,6 +1377,7 @@ int fetch_populated_submodules(struct repository *r,
        /* default value, "--submodule-prefix" and its value are added later */
 
        calculate_changed_submodule_paths(r);
+       string_list_sort(&changed_submodule_names);
        run_processes_parallel(max_parallel_jobs,
                               get_next_submodule,
                               fetch_start_failure,