submodule update --init: display correct path from submodule
authorStefan Beller <sbeller@google.com>
Sat, 7 Jan 2017 00:19:53 +0000 (16:19 -0800)
committerJunio C Hamano <gitster@pobox.com>
Thu, 12 Jan 2017 22:36:20 +0000 (14:36 -0800)
commit6e7c14e65c863b615a6a3abb2a3668b261008809
tree765697984c3ee9cf4349cbbcba084368483e3aa7
parentf6f858614003a3da794385cefdbddf00b85f7501
submodule update --init: display correct path from submodule

In the submodule helper we did not correctly handled the display path
for initializing submodules when both the submodule is inside a
subdirectory as well as the command being invoked from a subdirectory
(as viewed from the superproject).

This was broken in 3604242f080, which was written at a time where
there was no super-prefix available, so we abused the --prefix option
for the same purpose and could get only one case right (the call from
within a subdirectory, not the submodule being in a subdirectory).

Test-provided-by: David Turner <novalis@novalis.org>
Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/submodule--helper.c
git-submodule.sh
t/t7406-submodule-update.sh