diff options
-rwxr-xr-x | bin/git-develacc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/bin/git-develacc b/bin/git-develacc index b4b462a6..504818b7 100755 --- a/bin/git-develacc +++ b/bin/git-develacc @@ -53,9 +53,8 @@ git remote | while read remote; do # we need a url on the origin remote so that `mr register` # works. And then we might as well set an url on all the # remotes (except 'outside') for a nicer display in magit. - # Note that `get-url` expands insteadOf; might want to use - # `git config` to avoid that - git -C "$inside" remote set-url "$remote" "$(git remote get-url $remote)" + url="$(git config --local remote.$remote.url)" + git -C "$inside" config --local "remote.$remote.url" "$url" git -C "$inside" config --local --unset "remote.$remote.mirror" || true git -C "$inside" config --local "remote.$remote.fetch" "+refs/heads/*:refs/remotes/$remote/*" @@ -64,7 +63,7 @@ done # ensure we have a remote for the outside repo git -C "$inside" config --local --bool "remote.outside.skipdefaultupdate" true -git -C "$inside" remote set-url outside "$outside" # purely cosmetic, in magit +git -C "$inside" config --local "remote.outside.url" "$outside" # magit cosmetics git -C "$inside" config --local "remote.outside.fetch" "+refs/heads/*:refs/remotes/outside/*" # update all remote-tracking refs inside develacc |