]> git.ipfire.org Git - thirdparty/git.git/commit - submodule.c
submodule.c: sort changed_submodule_names before searching it
authorStefan Beller <sbeller@google.com>
Thu, 29 Nov 2018 00:27:50 +0000 (16:27 -0800)
committerJunio C Hamano <gitster@pobox.com>
Wed, 5 Dec 2018 02:42:31 +0000 (11:42 +0900)
commit08a297bd4996480f0b03830058f413bb24f0d37c
tree0c26e4b1901a00dae9a8f5959deff513721a09b4
parent25e3d28efd56124b51e02a3f8496401d4e8fb40b
submodule.c: sort changed_submodule_names before searching it

We can string_list_insert() to maintain sorted-ness of the
list as we find new items, or we can string_list_append() to
build an unsorted list and sort it at the end just once.

As we do not rely on the sortedness while building the
list, we pick the "append and sort at the end" as it
has better worst case execution times.

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
submodule.c