lib/braid/commands/setup.rb in norbert-braid-0.4.12 vs lib/braid/commands/setup.rb in norbert-braid-0.4.13
- old
+ new
@@ -14,17 +14,18 @@
end
def setup_one(path)
mirror = config.get!(path)
- if git.remote_exists?(mirror.remote)
+ if git.remote_url(mirror.remote)
msg "Mirror '#{mirror.path}/' already has a remote. Skipping."
return
end
msg "Setting up remote for '#{mirror.path}/'."
unless mirror.type == "svn"
- git.remote_add(mirror.remote, mirror.cached_url, mirror.branch)
+ url = use_local_cache? ? git_cache.path(mirror.url) : mirror.url
+ git.remote_add(mirror.remote, url, mirror.branch)
else
git_svn.init(mirror.remote, mirror.url)
end
end
end