From: Junio C Hamano Date: Mon, 23 Apr 2012 20:01:49 +0000 (-0700) Subject: Merge branch 'rj/submodule-mswin-path' X-Git-Tag: v1.7.11-rc0~117 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/8ea07808c1eaae9f819c37dd65affe674564627e?ds=inline;hp=--cc Merge branch 'rj/submodule-mswin-path' By Ramsay Jones * rj/submodule-mswin-path: git-submodule.sh: Don't use $path variable in eval_gettext string --- 8ea07808c1eaae9f819c37dd65affe674564627e diff --cc git-submodule.sh index 3d94a14079,279ff9333a..64a70d621a --- a/git-submodule.sh +++ b/git-submodule.sh @@@ -167,12 -168,11 +168,12 @@@ module_clone( a=${a%/} b=${b%/} - rel=$(echo $b | sed -e 's|[^/]*|..|g') + # Turn each leading "*/" component into "../" + rel=$(echo $b | sed -e 's|[^/][^/]*|..|g') - echo "gitdir: $rel/$a" >"$path/.git" + echo "gitdir: $rel/$a" >"$sm_path/.git" - rel=$(echo $a | sed -e 's|[^/]*|..|g') + rel=$(echo $a | sed -e 's|[^/][^/]*|..|g') - (clear_local_git_env; cd "$path" && GIT_WORK_TREE=. git config core.worktree "$rel/$b") + (clear_local_git_env; cd "$sm_path" && GIT_WORK_TREE=. git config core.worktree "$rel/$b") } #