From ea2d325b88562a074337a8bd30c37d3405c24fae Mon Sep 17 00:00:00 2001 From: Jens Lehmann Date: Mon, 20 Jun 2011 20:18:03 +0200 Subject: 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 Signed-off-by: Junio C Hamano --- submodule.c | 1 + 1 file changed, 1 insertion(+) (limited to 'submodule.c') diff --git a/submodule.c b/submodule.c index 5294cef641..e43f221af2 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) -- cgit v1.2.3