// FetchRefSpec is required, but default version can be generated
// if it isn't provided
if (fetchRefSpec == null || fetchRefSpec.isEmpty()) {
fetchRefSpec = String.format("+refs/heads/*:refs/remotes/%s/*", remoteName); //$NON-NLS-1$
}
rc.addFetchRefSpec(new RefSpec(fetchRefSpec));
// pushURI is optional
if (remotePushURI != null && !remotePushURI.isEmpty())
rc.addPushURI(new URIish(remotePushURI));
// PushRefSpec is optional
if (pushRefSpec != null && !pushRefSpec.isEmpty())