diff options
author | Junio C Hamano <gitster@pobox.com> | 2012-04-20 15:50:13 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-04-20 15:50:14 -0700 |
commit | af78c317205ce254d9cc75fc0298ee86b579de73 (patch) | |
tree | 548fe90b56be5aa8e7cf40b9edc06e98f1fdceac | |
parent | bd6f71d1fca865507b3f0a9e310b4d02632cf0ce (diff) | |
parent | c5bc42b9b7bfa8dc2e769c4549572265af259d12 (diff) | |
download | git-af78c317205ce254d9cc75fc0298ee86b579de73.tar.gz |
Merge branch 'bw/submodule-sed-solaris'
By Ben Walton
* bw/submodule-sed-solaris:
Avoid bug in Solaris xpg4/sed as used in submodule
-rwxr-xr-x | git-submodule.sh | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/git-submodule.sh b/git-submodule.sh index efc86ad4e0..3d94a14079 100755 --- a/git-submodule.sh +++ b/git-submodule.sh @@ -167,10 +167,11 @@ 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" - 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") } |