public void update(Config rc) {final List<String> vlst = new ArrayList<>();vlst.clear();for (URIish u : getURIs())vlst.add(u.toPrivateString());rc.setStringList(SECTION, getName(), KEY_URL, vlst);vlst.clear();for (URIish u : getPushURIs())vlst.add(u.toPrivateString());rc.setStringList(SECTION, getName(), KEY_PUSHURL, vlst);vlst.clear();for (RefSpec u : getFetchRefSpecs())vlst.add(u.toString());rc.setStringList(SECTION, getName(), KEY_FETCH, vlst);vlst.clear();for (RefSpec u : getPushRefSpecs())vlst.add(u.toString());rc.setStringList(SECTION, getName(), KEY_PUSH, vlst);set(rc, KEY_UPLOADPACK, getUploadPack(), DEFAULT_UPLOAD_PACK);set(rc, KEY_RECEIVEPACK, getReceivePack(), DEFAULT_RECEIVE_PACK);set(rc, KEY_TAGOPT, getTagOpt().option(), TagOpt.AUTO_FOLLOW.option());set(rc, KEY_MIRROR, mirror, DEFAULT_MIRROR);set(rc, KEY_TIMEOUT, timeout, 0);}
public virtual void Update(Config rc){IList<string> vlst = new AList<string>();vlst.Clear();foreach (URIish u in URIs){vlst.AddItem(u.ToPrivateString());}rc.SetStringList(SECTION, Name, KEY_URL, vlst);vlst.Clear();foreach (URIish u_1 in PushURIs){vlst.AddItem(u_1.ToPrivateString());}rc.SetStringList(SECTION, Name, KEY_PUSHURL, vlst);vlst.Clear();foreach (RefSpec u_2 in FetchRefSpecs){vlst.AddItem(u_2.ToString());}rc.SetStringList(SECTION, Name, KEY_FETCH, vlst);vlst.Clear();foreach (RefSpec u_3 in PushRefSpecs){vlst.AddItem(u_3.ToString());}rc.SetStringList(SECTION, Name, KEY_PUSH, vlst);Set(rc, KEY_UPLOADPACK, UploadPack, DEFAULT_UPLOAD_PACK);Set(rc, KEY_RECEIVEPACK, ReceivePack, DEFAULT_RECEIVE_PACK);Set(rc, KEY_TAGOPT, TagOpt.Option(), NGit.Transport.TagOpt.AUTO_FOLLOW.Option());Set(rc, KEY_MIRROR, mirror, DEFAULT_MIRROR);Set(rc, KEY_TIMEOUT, timeout, 0);if (!oldName.Equals(name)){rc.UnsetSection(SECTION, oldName);oldName = name;}}