From: Junio C Hamano Date: Tue, 26 Mar 2013 19:44:26 +0000 (-0700) Subject: Merge branch 'we/submodule-update-prefix-output' into maint X-Git-Tag: v1.8.2.1~32 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=50734ea0af6b92b82ade0be23db382ab87f9294a;p=thirdparty%2Fgit.git Merge branch 'we/submodule-update-prefix-output' into maint "git submodule update", when recursed into sub-submodules, did not acccumulate the prefix paths. * we/submodule-update-prefix-output: submodule update: when using recursion, show full path --- 50734ea0af6b92b82ade0be23db382ab87f9294a diff --cc git-submodule.sh index 004c034bc0,f2c53c9a02..ab29bfeb73 --- a/git-submodule.sh +++ b/git-submodule.sh @@@ -659,23 -624,9 +659,23 @@@ Maybe you want to use 'update --init'?" else subsha1=$(clear_local_git_env; cd "$sm_path" && git rev-parse --verify HEAD) || - die "$(eval_gettext "Unable to find current revision in submodule path '\$sm_path'")" + die "$(eval_gettext "Unable to find current revision in submodule path '\$prefix\$sm_path'")" fi + if test -n "$remote" + then + if test -z "$nofetch" + then + # Fetch remote before determining tracking $sha1 + (clear_local_git_env; cd "$sm_path" && git-fetch) || + die "$(eval_gettext "Unable to fetch in submodule path '\$sm_path'")" + fi + remote_name=$(clear_local_git_env; cd "$sm_path" && get_default_remote) + sha1=$(clear_local_git_env; cd "$sm_path" && + git rev-parse --verify "${remote_name}/${branch}") || + die "$(eval_gettext "Unable to find current ${remote_name}/${branch} revision in submodule path '\$sm_path'")" + fi + if test "$subsha1" != "$sha1" -o -n "$force" then subforce=$force