List of usage examples for org.eclipse.jgit.transport RemoteConfig setTagOpt
public void setTagOpt(TagOpt option)
From source file:org.eclipse.egit.ui.internal.fetch.FetchWizard.java
License:Open Source License
private void saveConfig() { final RemoteConfig rc = repoPage.getSelection().getConfig(); rc.setFetchRefSpecs(refSpecPage.getRefSpecs()); rc.setTagOpt(refSpecPage.getTagOpt()); final StoredConfig config = localDb.getConfig(); rc.update(config);//w w w . ja va2 s . c o m try { config.save(); } catch (final IOException e) { ErrorDialog.openError(getShell(), UIText.FetchWizard_cantSaveTitle, UIText.FetchWizard_cantSaveMessage, new Status(IStatus.WARNING, Activator.getPluginId(), e.getMessage(), e)); // Continue, it's not critical. } }
From source file:org.eclipse.egit.ui.internal.repository.NewRemoteWizard.java
License:Open Source License
@Override public boolean performFinish() { RemoteConfig config; try {//w w w .j a v a2s . c o m config = new RemoteConfig(myConfiguration, selNamePage.remoteName.getText()); } catch (URISyntaxException e1) { // TODO better Exception handling return false; } if (selNamePage.configureFetch.getSelection()) { config.addURI(configureFetchUriPage.getUri()); config.setFetchRefSpecs(configureFetchSpecPage.getRefSpecs()); config.setTagOpt(configureFetchSpecPage.getTagOpt()); } if (selNamePage.configurePush.getSelection()) { for (URIish uri : configurePushUriPage.getUris()) config.addPushURI(uri); config.setPushRefSpecs(configurePushSpecPage.getRefSpecs()); } config.update(myConfiguration); try { myConfiguration.save(); return true; } catch (IOException e) { // TODO better Exception handling return false; } }