Merge branch 'we/submodule-update-prefix-output'
authorJunio C Hamano <gitster@pobox.com>
Thu, 21 Mar 2013 21:03:10 +0000 (14:03 -0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 21 Mar 2013 21:03:10 +0000 (14:03 -0700)
"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

1  2 
git-submodule.sh
t/t7406-submodule-update.sh
index 004c034bc09449416ff6d66b7570d48b651f96cb,f2c53c9a02d84ae4ecd0f465388d26febfcae519..ab29bfeb738d1b8f452c558ba6f6d7aa4e854b3d
@@@ -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
Simple merge