Code

fetch: skip on-demand checking when no submodules are configured
authorJens Lehmann <Jens.Lehmann@web.de>
Fri, 9 Sep 2011 18:22:03 +0000 (20:22 +0200)
committerJunio C Hamano <gitster@pobox.com>
Fri, 9 Sep 2011 20:59:20 +0000 (13:59 -0700)
commit18322badc2b3b7f49f79da5273e003e9c0c4f549
treeda2a7c9e26e2a0cbe74c7d096b0c6d6dd58f69b0
parentf696543dad6c7ba27b0c4fab167a5687263a9ba0
fetch: skip on-demand checking when no submodules are configured

It makes no sense to do the - possibly very expensive - call to "rev-list
<new-ref-sha1> --not --all" in check_for_new_submodule_commits() when
there aren't any submodules configured.

Leave check_for_new_submodule_commits() early when no name <-> path
mappings for submodules are found in the configuration. To make that work
reading the configuration had to be moved further up in cmd_fetch(), as
doing that after the actual fetch of the superproject was too late.

Reported-by: Martin Fick <mfick@codeaurora.org>
Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/fetch.c
submodule.c