Do not double sort submodule list

(fixes issue #1802)

Signed-off-by: Yue Lin Ho <b8732003@student.nsysu.edu.tw>
Signed-off-by: Sven Strickroth <email@cs-ware.de>
Mark parameters as const

Signed-off-by: Sven Strickroth <email@cs-ware.de>
Optimize sort order: Ignore case and honor logical sort (if not disabled)

Signed-off-by: Sven Strickroth <email@cs-ware.de>
Merge branch 'issue-1802'

Signed-off-by: Sven Strickroth <email@cs-ware.de>
Check the pointers before accessing them

based on TortoiseSVN rev. 25128.

Signed-off-by: Sven Strickroth <email@cs-ware.de>
Make parameter const

Signed-off-by: Sup Yut Sum <ch3cooli@gmail.com>