{"thread":{"id":"28986","subject":"[PATCH/RFC 3/3] git-submodule.sh: Don't use $path variable in eval_gettext string","startedAt":"2011-11-19T19:59:43Z","lastAt":"2011-11-19T19:59:43Z","messageCount":1,"participants":["Ramsay Jones"],"isPatch":true,"patchVersion":1,"patchTotal":3},"messages":[{"id":"179743","messageId":"4EC80AAF.1030001@ramsay1.demon.co.uk","threadId":"28986","inReplyTo":null,"subject":"[PATCH/RFC 3/3] git-submodule.sh: Don't use $path variable in eval_gettext string","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsay1.demon.co.uk","sentAt":"2011-11-19T19:59:43Z","receivedAt":"2011-11-19T19:59:43Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"\nThe eval_gettext (and eval_gettextln) i18n shell functions call\ngit-sh-i18n--envsubst to process the variable references in the\nstring parameter. Unfortunately, environment variables are case\ninsensitive on windows, which leads to failure when eval_gettext\nexports $path.\n\nCommit df599e9 (Windows: teach getenv to do a case-sensitive search,\n06-06-2011) solved this problem on MinGW by overriding the system\ngetenv() function to allow git-sh-i18n--envsubst to read $path\nrather than $PATH from the environment.\n\nAs an alternative, we finesse the problem by renaming the $path\nvariable to $sm_path (submodule path). We note that the foreach\nsubcommand provides $path to user scripts, so we can't simply\nrename it to $sm_path.\n\nSigned-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>\n---\n\nNote that, on cygwin, this fixes t7400-*.sh, t7407-*.sh and t7407-*.sh\n(and maybe t7408-*.sh; I didn't get that far ;-).\n\nNote that the first hunk has an independent fix which could be split\nout into a separate patch.\n\nThis is marked RFC because the approach taken by commit df599e9 may\nbe the preferred solution; I just wanted to try a different approach\nsince t7400-submodue-basic.sh fails for me on MinGW (in a way that\nseems to imply that $PATH has been corrupted; *but* I haven't spent\nany time investigating it).\n\nATB,\nRamsay Jones\n\n git-submodule.sh |  161 +++++++++++++++++++++++++++--------------------------\n 1 files changed, 82 insertions(+), 79 deletions(-)\n\ndiff --git a/git-submodule.sh b/git-submodule.sh\nindex 3adab93..1acd626 100755\n--- a/git-submodule.sh\n+++ b/git-submodule.sh\n@@ -101,11 +101,12 @@ module_list()\n module_name()\n {\n \t# Do we have \"submodule.<something>.path = $1\" defined in .gitmodules file?\n+\tsm_path=\"$1\"\n \tre=$(printf '%s\\n' \"$1\" | sed -e 's/[].[^$\\\\*]/\\\\&/g')\n \tname=$( git config -f .gitmodules --get-regexp '^submodule\\..*\\.path$' |\n \t\tsed -n -e 's|^submodule\\.\\(.*\\)\\.path '\"$re\"'$|\\1|p' )\n \ttest -z \"$name\" &&\n-\tdie \"$(eval_gettext \"No submodule mapping found in .gitmodules for path '\\$path'\")\"\n+\tdie \"$(eval_gettext \"No submodule mapping found in .gitmodules for path '\\$sm_path'\")\"\n \techo \"$name\"\n }\n \n@@ -119,7 +120,7 @@ module_name()\n #\n module_clone()\n {\n-\tpath=$1\n+\tsm_path=$1\n \turl=$2\n \treference=\"$3\"\n \tquiet=\n@@ -130,12 +131,12 @@ module_clone()\n \n \tgitdir=\n \tgitdir_base=\n-\tname=$(module_name \"$path\" 2>/dev/null)\n-\tbase_path=$(dirname \"$path\")\n+\tname=$(module_name \"$sm_path\" 2>/dev/null)\n+\tbase_path=$(dirname \"$sm_path\")\n \n \tgitdir=$(git rev-parse --git-dir)\n \tgitdir_base=\"$gitdir/modules/$base_path\"\n-\tgitdir=\"$gitdir/modules/$path\"\n+\tgitdir=\"$gitdir/modules/$sm_path\"\n \n \tcase $gitdir in\n \t/*)\n@@ -158,18 +159,18 @@ module_clone()\n \n \tif test -d \"$gitdir\"\n \tthen\n-\t\tmkdir -p \"$path\"\n-\t\techo \"gitdir: $rel_gitdir\" >\"$path/.git\"\n+\t\tmkdir -p \"$sm_path\"\n+\t\techo \"gitdir: $rel_gitdir\" >\"$sm_path/.git\"\n \t\trm -f \"$gitdir/index\"\n \telse\n \t\tmkdir -p \"$gitdir_base\"\n \t\tif test -n \"$reference\"\n \t\tthen\n-\t\t\tgit-clone $quiet \"$reference\" -n \"$url\" \"$path\" --separate-git-dir \"$gitdir\"\n+\t\t\tgit-clone $quiet \"$reference\" -n \"$url\" \"$sm_path\" --separate-git-dir \"$gitdir\"\n \t\telse\n-\t\t\tgit-clone $quiet -n \"$url\" \"$path\" --separate-git-dir \"$gitdir\"\n+\t\t\tgit-clone $quiet -n \"$url\" \"$sm_path\" --separate-git-dir \"$gitdir\"\n \t\tfi ||\n-\t\tdie \"$(eval_gettext \"Clone of '\\$url' into submodule path '\\$path' failed\")\"\n+\t\tdie \"$(eval_gettext \"Clone of '\\$url' into submodule path '\\$sm_path' failed\")\"\n \tfi\n }\n \n@@ -221,14 +222,14 @@ cmd_add()\n \tdone\n \n \trepo=$1\n-\tpath=$2\n+\tsm_path=$2\n \n-\tif test -z \"$path\"; then\n-\t\tpath=$(echo \"$repo\" |\n+\tif test -z \"$sm_path\"; then\n+\t\tsm_path=$(echo \"$repo\" |\n \t\t\tsed -e 's|/$||' -e 's|:*/*\\.git$||' -e 's|.*[/:]||g')\n \tfi\n \n-\tif test -z \"$repo\" -o -z \"$path\"; then\n+\tif test -z \"$repo\" -o -z \"$sm_path\"; then\n \t\tusage\n \tfi\n \n@@ -249,7 +250,7 @@ cmd_add()\n \n \t# normalize path:\n \t# multiple //; leading ./; /./; /../; trailing /\n-\tpath=$(printf '%s/\\n' \"$path\" |\n+\tsm_path=$(printf '%s/\\n' \"$sm_path\" |\n \t\tsed -e '\n \t\t\ts|//*|/|g\n \t\t\ts|^\\(\\./\\)*||\n@@ -259,49 +260,49 @@ cmd_add()\n \t\t\ttstart\n \t\t\ts|/*$||\n \t\t')\n-\tgit ls-files --error-unmatch \"$path\" > /dev/null 2>&1 &&\n-\tdie \"$(eval_gettext \"'\\$path' already exists in the index\")\"\n+\tgit ls-files --error-unmatch \"$sm_path\" > /dev/null 2>&1 &&\n+\tdie \"$(eval_gettext \"'\\$sm_path' already exists in the index\")\"\n \n-\tif test -z \"$force\" && ! git add --dry-run --ignore-missing \"$path\" > /dev/null 2>&1\n+\tif test -z \"$force\" && ! git add --dry-run --ignore-missing \"$sm_path\" > /dev/null 2>&1\n \tthen\n \t\teval_gettextln \"The following path is ignored by one of your .gitignore files:\n-\\$path\n+\\$sm_path\n Use -f if you really want to add it.\" >&2\n \t\texit 1\n \tfi\n \n \t# perhaps the path exists and is already a git repo, else clone it\n-\tif test -e \"$path\"\n+\tif test -e \"$sm_path\"\n \tthen\n-\t\tif test -d \"$path\"/.git -o -f \"$path\"/.git\n+\t\tif test -d \"$sm_path\"/.git -o -f \"$sm_path\"/.git\n \t\tthen\n-\t\t\teval_gettextln \"Adding existing repo at '\\$path' to the index\"\n+\t\t\teval_gettextln \"Adding existing repo at '\\$sm_path' to the index\"\n \t\telse\n-\t\t\tdie \"$(eval_gettext \"'\\$path' already exists and is not a valid git repo\")\"\n+\t\t\tdie \"$(eval_gettext \"'\\$sm_path' already exists and is not a valid git repo\")\"\n \t\tfi\n \n \telse\n \n-\t\tmodule_clone \"$path\" \"$realrepo\" \"$reference\" || exit\n+\t\tmodule_clone \"$sm_path\" \"$realrepo\" \"$reference\" || exit\n \t\t(\n \t\t\tclear_local_git_env\n-\t\t\tcd \"$path\" &&\n+\t\t\tcd \"$sm_path\" &&\n \t\t\t# ash fails to wordsplit ${branch:+-b \"$branch\"...}\n \t\t\tcase \"$branch\" in\n \t\t\t'') git checkout -f -q ;;\n \t\t\t?*) git checkout -f -q -B \"$branch\" \"origin/$branch\" ;;\n \t\t\tesac\n-\t\t) || die \"$(eval_gettext \"Unable to checkout submodule '\\$path'\")\"\n+\t\t) || die \"$(eval_gettext \"Unable to checkout submodule '\\$sm_path'\")\"\n \tfi\n-\tgit config submodule.\"$path\".url \"$realrepo\"\n+\tgit config submodule.\"$sm_path\".url \"$realrepo\"\n \n-\tgit add $force \"$path\" ||\n-\tdie \"$(eval_gettext \"Failed to add submodule '\\$path'\")\"\n+\tgit add $force \"$sm_path\" ||\n+\tdie \"$(eval_gettext \"Failed to add submodule '\\$sm_path'\")\"\n \n-\tgit config -f .gitmodules submodule.\"$path\".path \"$path\" &&\n-\tgit config -f .gitmodules submodule.\"$path\".url \"$repo\" &&\n+\tgit config -f .gitmodules submodule.\"$sm_path\".path \"$sm_path\" &&\n+\tgit config -f .gitmodules submodule.\"$sm_path\".url \"$repo\" &&\n \tgit add --force .gitmodules ||\n-\tdie \"$(eval_gettext \"Failed to register submodule '\\$path'\")\"\n+\tdie \"$(eval_gettext \"Failed to register submodule '\\$sm_path'\")\"\n }\n \n #\n@@ -339,23 +340,25 @@ cmd_foreach()\n \texec 3<&0\n \n \tmodule_list |\n-\twhile read mode sha1 stage path\n+\twhile read mode sha1 stage sm_path\n \tdo\n-\t\tif test -e \"$path\"/.git\n+\t\tif test -e \"$sm_path\"/.git\n \t\tthen\n-\t\t\tsay \"$(eval_gettext \"Entering '\\$prefix\\$path'\")\"\n-\t\t\tname=$(module_name \"$path\")\n+\t\t\tsay \"$(eval_gettext \"Entering '\\$prefix\\$sm_path'\")\"\n+\t\t\tname=$(module_name \"$sm_path\")\n \t\t\t(\n-\t\t\t\tprefix=\"$prefix$path/\"\n+\t\t\t\tprefix=\"$prefix$sm_path/\"\n \t\t\t\tclear_local_git_env\n-\t\t\t\tcd \"$path\" &&\n+\t\t\t\t# we make $path available to scripts ...\n+\t\t\t\tpath=$sm_path\n+\t\t\t\tcd \"$sm_path\" &&\n \t\t\t\teval \"$@\" &&\n \t\t\t\tif test -n \"$recursive\"\n \t\t\t\tthen\n \t\t\t\t\tcmd_foreach \"--recursive\" \"$@\"\n \t\t\t\tfi\n \t\t\t) <&3 3<&- ||\n-\t\t\tdie \"$(eval_gettext \"Stopping at '\\$path'; script returned non-zero status.\")\"\n+\t\t\tdie \"$(eval_gettext \"Stopping at '\\$sm_path'; script returned non-zero status.\")\"\n \t\tfi\n \tdone\n }\n@@ -389,15 +392,15 @@ cmd_init()\n \tdone\n \n \tmodule_list \"$@\" |\n-\twhile read mode sha1 stage path\n+\twhile read mode sha1 stage sm_path\n \tdo\n \t\t# Skip already registered paths\n-\t\tname=$(module_name \"$path\") || exit\n+\t\tname=$(module_name \"$sm_path\") || exit\n \t\tif test -z \"$(git config \"submodule.$name.url\")\"\n \t\tthen\n \t\t\turl=$(git config -f .gitmodules submodule.\"$name\".url)\n \t\t\ttest -z \"$url\" &&\n-\t\t\tdie \"$(eval_gettext \"No url found for submodule path '\\$path' in .gitmodules\")\"\n+\t\t\tdie \"$(eval_gettext \"No url found for submodule path '\\$sm_path' in .gitmodules\")\"\n \n \t\t\t# Possibly a url relative to parent\n \t\t\tcase \"$url\" in\n@@ -406,7 +409,7 @@ cmd_init()\n \t\t\t\t;;\n \t\t\tesac\n \t\t\tgit config submodule.\"$name\".url \"$url\" ||\n-\t\t\tdie \"$(eval_gettext \"Failed to register url for submodule path '\\$path'\")\"\n+\t\t\tdie \"$(eval_gettext \"Failed to register url for submodule path '\\$sm_path'\")\"\n \t\tfi\n \n \t\t# Copy \"update\" setting when it is not set yet\n@@ -414,9 +417,9 @@ cmd_init()\n \t\ttest -z \"$upd\" ||\n \t\ttest -n \"$(git config submodule.\"$name\".update)\" ||\n \t\tgit config submodule.\"$name\".update \"$upd\" ||\n-\t\tdie \"$(eval_gettext \"Failed to register update mode for submodule path '\\$path'\")\"\n+\t\tdie \"$(eval_gettext \"Failed to register update mode for submodule path '\\$sm_path'\")\"\n \n-\t\tsay \"$(eval_gettext \"Submodule '\\$name' (\\$url) registered for path '\\$path'\")\"\n+\t\tsay \"$(eval_gettext \"Submodule '\\$name' (\\$url) registered for path '\\$sm_path'\")\"\n \tdone\n }\n \n@@ -488,14 +491,14 @@ cmd_update()\n \tcloned_modules=\n \tmodule_list \"$@\" | {\n \terr=\n-\twhile read mode sha1 stage path\n+\twhile read mode sha1 stage sm_path\n \tdo\n \t\tif test \"$stage\" = U\n \t\tthen\n-\t\t\techo >&2 \"Skipping unmerged submodule $path\"\n+\t\t\techo >&2 \"Skipping unmerged submodule $sm_path\"\n \t\t\tcontinue\n \t\tfi\n-\t\tname=$(module_name \"$path\") || exit\n+\t\tname=$(module_name \"$sm_path\") || exit\n \t\turl=$(git config submodule.\"$name\".url)\n \t\tif ! test -z \"$update\"\n \t\tthen\n@@ -506,7 +509,7 @@ cmd_update()\n \n \t\tif test \"$update_module\" = \"none\"\n \t\tthen\n-\t\t\techo \"Skipping submodule '$path'\"\n+\t\t\techo \"Skipping submodule '$sm_path'\"\n \t\t\tcontinue\n \t\tfi\n \n@@ -515,20 +518,20 @@ cmd_update()\n \t\t\t# Only mention uninitialized submodules when its\n \t\t\t# path have been specified\n \t\t\ttest \"$#\" != \"0\" &&\n-\t\t\tsay \"$(eval_gettext \"Submodule path '\\$path' not initialized\n+\t\t\tsay \"$(eval_gettext \"Submodule path '\\$sm_path' not initialized\n Maybe you want to use 'update --init'?\")\"\n \t\t\tcontinue\n \t\tfi\n \n-\t\tif ! test -d \"$path\"/.git -o -f \"$path\"/.git\n+\t\tif ! test -d \"$sm_path\"/.git -o -f \"$sm_path\"/.git\n \t\tthen\n-\t\t\tmodule_clone \"$path\" \"$url\" \"$reference\"|| exit\n+\t\t\tmodule_clone \"$sm_path\" \"$url\" \"$reference\"|| exit\n \t\t\tcloned_modules=\"$cloned_modules;$name\"\n \t\t\tsubsha1=\n \t\telse\n-\t\t\tsubsha1=$(clear_local_git_env; cd \"$path\" &&\n+\t\t\tsubsha1=$(clear_local_git_env; cd \"$sm_path\" &&\n \t\t\t\tgit rev-parse --verify HEAD) ||\n-\t\t\tdie \"$(eval_gettext \"Unable to find current revision in submodule path '\\$path'\")\"\n+\t\t\tdie \"$(eval_gettext \"Unable to find current revision in submodule path '\\$sm_path'\")\"\n \t\tfi\n \n \t\tif test \"$subsha1\" != \"$sha1\"\n@@ -544,10 +547,10 @@ Maybe you want to use 'update --init'?\")\"\n \t\t\tthen\n \t\t\t\t# Run fetch only if $sha1 isn't present or it\n \t\t\t\t# is not reachable from a ref.\n-\t\t\t\t(clear_local_git_env; cd \"$path\" &&\n+\t\t\t\t(clear_local_git_env; cd \"$sm_path\" &&\n \t\t\t\t\t( (rev=$(git rev-list -n 1 $sha1 --not --all 2>/dev/null) &&\n \t\t\t\t\t test -z \"$rev\") || git-fetch)) ||\n-\t\t\t\tdie \"$(eval_gettext \"Unable to fetch in submodule path '\\$path'\")\"\n+\t\t\t\tdie \"$(eval_gettext \"Unable to fetch in submodule path '\\$sm_path'\")\"\n \t\t\tfi\n \n \t\t\t# Is this something we just cloned?\n@@ -561,24 +564,24 @@ Maybe you want to use 'update --init'?\")\"\n \t\t\tcase \"$update_module\" in\n \t\t\trebase)\n \t\t\t\tcommand=\"git rebase\"\n-\t\t\t\tdie_msg=\"$(eval_gettext \"Unable to rebase '\\$sha1' in submodule path '\\$path'\")\"\n-\t\t\t\tsay_msg=\"$(eval_gettext \"Submodule path '\\$path': rebased into '\\$sha1'\")\"\n+\t\t\t\tdie_msg=\"$(eval_gettext \"Unable to rebase '\\$sha1' in submodule path '\\$sm_path'\")\"\n+\t\t\t\tsay_msg=\"$(eval_gettext \"Submodule path '\\$sm_path': rebased into '\\$sha1'\")\"\n \t\t\t\tmust_die_on_failure=yes\n \t\t\t\t;;\n \t\t\tmerge)\n \t\t\t\tcommand=\"git merge\"\n-\t\t\t\tdie_msg=\"$(eval_gettext \"Unable to merge '\\$sha1' in submodule path '\\$path'\")\"\n-\t\t\t\tsay_msg=\"$(eval_gettext \"Submodule path '\\$path': merged in '\\$sha1'\")\"\n+\t\t\t\tdie_msg=\"$(eval_gettext \"Unable to merge '\\$sha1' in submodule path '\\$sm_path'\")\"\n+\t\t\t\tsay_msg=\"$(eval_gettext \"Submodule path '\\$sm_path': merged in '\\$sha1'\")\"\n \t\t\t\tmust_die_on_failure=yes\n \t\t\t\t;;\n \t\t\t*)\n \t\t\t\tcommand=\"git checkout $subforce -q\"\n-\t\t\t\tdie_msg=\"$(eval_gettext \"Unable to checkout '\\$sha1' in submodule path '\\$path'\")\"\n-\t\t\t\tsay_msg=\"$(eval_gettext \"Submodule path '\\$path': checked out '\\$sha1'\")\"\n+\t\t\t\tdie_msg=\"$(eval_gettext \"Unable to checkout '\\$sha1' in submodule path '\\$sm_path'\")\"\n+\t\t\t\tsay_msg=\"$(eval_gettext \"Submodule path '\\$sm_path': checked out '\\$sha1'\")\"\n \t\t\t\t;;\n \t\t\tesac\n \n-\t\t\tif (clear_local_git_env; cd \"$path\" && $command \"$sha1\")\n+\t\t\tif (clear_local_git_env; cd \"$sm_path\" && $command \"$sha1\")\n \t\t\tthen\n \t\t\t\tsay \"$say_msg\"\n \t\t\telif test -n \"$must_die_on_failure\"\n@@ -592,11 +595,11 @@ Maybe you want to use 'update --init'?\")\"\n \n \t\tif test -n \"$recursive\"\n \t\tthen\n-\t\t\t(clear_local_git_env; cd \"$path\" && eval cmd_update \"$orig_flags\")\n+\t\t\t(clear_local_git_env; cd \"$sm_path\" && eval cmd_update \"$orig_flags\")\n \t\t\tres=$?\n \t\t\tif test $res -gt 0\n \t\t\tthen\n-\t\t\t\tdie_msg=\"$(eval_gettext \"Failed to recurse into submodule path '\\$path'\")\"\n+\t\t\t\tdie_msg=\"$(eval_gettext \"Failed to recurse into submodule path '\\$sm_path'\")\"\n \t\t\t\tif test $res -eq 1\n \t\t\t\tthen\n \t\t\t\t\terr=\"${err};$die_msg\"\n@@ -883,30 +886,30 @@ cmd_status()\n \tdone\n \n \tmodule_list \"$@\" |\n-\twhile read mode sha1 stage path\n+\twhile read mode sha1 stage sm_path\n \tdo\n-\t\tname=$(module_name \"$path\") || exit\n+\t\tname=$(module_name \"$sm_path\") || exit\n \t\turl=$(git config submodule.\"$name\".url)\n-\t\tdisplaypath=\"$prefix$path\"\n+\t\tdisplaypath=\"$prefix$sm_path\"\n \t\tif test \"$stage\" = U\n \t\tthen\n \t\t\tsay \"U$sha1 $displaypath\"\n \t\t\tcontinue\n \t\tfi\n-\t\tif test -z \"$url\" || ! test -d \"$path\"/.git -o -f \"$path\"/.git\n+\t\tif test -z \"$url\" || ! test -d \"$sm_path\"/.git -o -f \"$sm_path\"/.git\n \t\tthen\n \t\t\tsay \"-$sha1 $displaypath\"\n \t\t\tcontinue;\n \t\tfi\n-\t\tset_name_rev \"$path\" \"$sha1\"\n-\t\tif git diff-files --ignore-submodules=dirty --quiet -- \"$path\"\n+\t\tset_name_rev \"$sm_path\" \"$sha1\"\n+\t\tif git diff-files --ignore-submodules=dirty --quiet -- \"$sm_path\"\n \t\tthen\n \t\t\tsay \" $sha1 $displaypath$revname\"\n \t\telse\n \t\t\tif test -z \"$cached\"\n \t\t\tthen\n-\t\t\t\tsha1=$(clear_local_git_env; cd \"$path\" && git rev-parse --verify HEAD)\n-\t\t\t\tset_name_rev \"$path\" \"$sha1\"\n+\t\t\t\tsha1=$(clear_local_git_env; cd \"$sm_path\" && git rev-parse --verify HEAD)\n+\t\t\t\tset_name_rev \"$sm_path\" \"$sha1\"\n \t\t\tfi\n \t\t\tsay \"+$sha1 $displaypath$revname\"\n \t\tfi\n@@ -916,10 +919,10 @@ cmd_status()\n \t\t\t(\n \t\t\t\tprefix=\"$displaypath/\"\n \t\t\t\tclear_local_git_env\n-\t\t\t\tcd \"$path\" &&\n+\t\t\t\tcd \"$sm_path\" &&\n \t\t\t\teval cmd_status \"$orig_args\"\n \t\t\t) ||\n-\t\t\tdie \"$(eval_gettext \"Failed to recurse into submodule path '\\$path'\")\"\n+\t\t\tdie \"$(eval_gettext \"Failed to recurse into submodule path '\\$sm_path'\")\"\n \t\tfi\n \tdone\n }\n@@ -951,9 +954,9 @@ cmd_sync()\n \tdone\n \tcd_to_toplevel\n \tmodule_list \"$@\" |\n-\twhile read mode sha1 stage path\n+\twhile read mode sha1 stage sm_path\n \tdo\n-\t\tname=$(module_name \"$path\")\n+\t\tname=$(module_name \"$sm_path\")\n \t\turl=$(git config -f .gitmodules --get submodule.\"$name\".url)\n \n \t\t# Possibly a url relative to parent\n@@ -968,11 +971,11 @@ cmd_sync()\n \t\t\tsay \"$(eval_gettext \"Synchronizing submodule url for '\\$name'\")\"\n \t\t\tgit config submodule.\"$name\".url \"$url\"\n \n-\t\t\tif test -e \"$path\"/.git\n+\t\t\tif test -e \"$sm_path\"/.git\n \t\t\tthen\n \t\t\t(\n \t\t\t\tclear_local_git_env\n-\t\t\t\tcd \"$path\"\n+\t\t\t\tcd \"$sm_path\"\n \t\t\t\tremote=$(get_default_remote)\n \t\t\t\tgit config remote.\"$remote\".url \"$url\"\n \t\t\t)\n-- \n1.7.7\n"}]}