public static Transport open(Repository local, URIish uri, String remoteName)throws NotSupportedException, TransportException {for (WeakReference<TransportProtocol> ref : protocols) {TransportProtocol proto = ref.get();if (proto == null) {protocols.remove(ref);continue;}if (proto.canHandle(uri, local, remoteName)) {Transport tn = proto.open(uri, local, remoteName);tn.prePush = Hooks.prePush(local, tn.hookOutRedirect);tn.prePush.setRemoteLocation(uri.toString());tn.prePush.setRemoteName(remoteName);return tn;}}throw new NotSupportedException(MessageFormat.format(JGitText.get().URINotSupported, uri));}
public static NGit.Transport.Transport Open(Repository local, URIish uri, stringremoteName){foreach (JavaWeakReference<TransportProtocol> @ref in protocols){TransportProtocol proto = @ref.Get();if (proto == null){protocols.Remove(@ref);continue;}if (proto.CanHandle(uri, local, remoteName)){return proto.Open(uri, local, remoteName);}}throw new NGit.Errors.NotSupportedException(MessageFormat.Format(JGitText.Get().URINotSupported, uri));}