aboutsummaryrefslogtreecommitdiff
path: root/trace.c
diff options
context:
space:
mode:
authorJens Lehmann <Jens.Lehmann@web.de>2012-05-28 21:46:58 +0200
committerJunio C Hamano <gitster@pobox.com>2012-05-29 13:52:23 -0700
commitc1c259e225cf39c7353c673ad2c7c84450d909c1 (patch)
tree4698a3e4d2d3abd1eb03435258fe76b463a7568f /trace.c
parentbefc5ed3799cb6fcbaa7de03e7fa1760e846853c (diff)
downloadgit-c1c259e225cf39c7353c673ad2c7c84450d909c1.tar.gz
git-c1c259e225cf39c7353c673ad2c7c84450d909c1.tar.xz
submodules: print "registered for path" message only once
Since 2cd9de3e (submodule add: always initialize .git/config entry) the message "Submodule '\$name' (\$url) registered for path '\$sm_path'" is printed every time cmd_init() is called, e.g. each time "git submodule update" is used with the --init option. This was not intended and leads to bogus output which can confuse users and build systems. Apart from that the $url variable was not set after the first run which did the actual initialization and only "()" was printed in subsequent runs where "($url)" was meant to inform the user about the upstream repo. Fix that by moving the say command in question into the if block where the url is initialized, restoring the behavior that was in place before the 2cd9de3e commit. While at it also remove the comment which still describes the logic used before 2cd9de3e and add a comment about how things work now. Reported-by: Nicolas Viennot and Sid Nair <nicolas@viennot.com> Reported-by: Heiko Voigt <hvoigt@hvoigt.net> Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'trace.c')
0 files changed, 0 insertions, 0 deletions