Skip to content

Commit

Permalink
Merge branch 'bw/submodule-sed-solaris'
Browse files Browse the repository at this point in the history
By Ben Walton
* bw/submodule-sed-solaris:
  Avoid bug in Solaris xpg4/sed as used in submodule
  • Loading branch information
Junio C Hamano committed Apr 20, 2012
2 parents bd6f71d + c5bc42b commit af78c31
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions git-submodule.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}

Expand Down

0 comments on commit af78c31

Please sign in to comment.