summaryrefslogtreecommitdiff
path: root/submodule.c
diff options
context:
space:
mode:
authorJens Lehmann <Jens.Lehmann@web.de>2011-06-20 18:18:03 (GMT)
committerJunio C Hamano <gitster@pobox.com>2011-06-20 20:04:49 (GMT)
commitea2d325b88562a074337a8bd30c37d3405c24fae (patch)
treeee3ce9f3a9a422aba35e5fe259e05e6f16680d72 /submodule.c
parentdaab4eeafa0dc620d67ccb57c28e08f6f8b3868c (diff)
downloadgit-ea2d325b88562a074337a8bd30c37d3405c24fae.zip
git-ea2d325b88562a074337a8bd30c37d3405c24fae.tar.gz
git-ea2d325b88562a074337a8bd30c37d3405c24fae.tar.bz2
fetch: Also fetch submodules in subdirectories in on-demand mode
When on-demand mode was active examining the new commits just fetched in the superproject (to check if they record commits for submodules which are not downloaded yet) wasn't done recursively. Because of that fetch did not recursively fetch submodules living in subdirectories even when it should have. Fix that by adding the RECURSIVE flag to the diff_options used to check the new commits and avoid future regressions in this area by moving a submodule in t5526 into a subdirectory. Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'submodule.c')
-rw-r--r--submodule.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/submodule.c b/submodule.c
index 5294cef..e43f221 100644
--- a/submodule.c
+++ b/submodule.c
@@ -362,6 +362,7 @@ void check_for_new_submodule_commits(unsigned char new_sha1[20])
while (parent) {
struct diff_options diff_opts;
diff_setup(&diff_opts);
+ DIFF_OPT_SET(&diff_opts, RECURSIVE);
diff_opts.output_format |= DIFF_FORMAT_CALLBACK;
diff_opts.format_callback = submodule_collect_changed_cb;
if (diff_setup_done(&diff_opts) < 0)