summaryrefslogtreecommitdiff
path: root/git-submodule.sh
diff options
context:
space:
mode:
authorStefan Beller <sbeller@google.com>2017-01-06 16:19:53 -0800
committerJunio C Hamano <gitster@pobox.com>2017-01-12 14:36:20 -0800
commit6e7c14e65c863b615a6a3abb2a3668b261008809 (patch)
tree765697984c3ee9cf4349cbbcba084368483e3aa7 /git-submodule.sh
parentf6f858614003a3da794385cefdbddf00b85f7501 (diff)
downloadgit-6e7c14e65c863b615a6a3abb2a3668b261008809.tar.gz
submodule update --init: display correct path from submodulesb/submodule-init
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>
Diffstat (limited to 'git-submodule.sh')
-rwxr-xr-xgit-submodule.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/git-submodule.sh b/git-submodule.sh
index 9285b5c43d..4e47ff8ad8 100755
--- a/git-submodule.sh
+++ b/git-submodule.sh
@@ -374,7 +374,7 @@ cmd_init()
shift
done
- git ${wt_prefix:+-C "$wt_prefix"} submodule--helper init ${GIT_QUIET:+--quiet} ${prefix:+--prefix "$prefix"} "$@"
+ git ${wt_prefix:+-C "$wt_prefix"} ${prefix:+--super-prefix "$prefix"} submodule--helper init ${GIT_QUIET:+--quiet} "$@"
}
#