本文整理匯總了Java中org.eclipse.jgit.lib.Constants.DEFAULT_REMOTE_NAME屬性的典型用法代碼示例。如果您正苦於以下問題:Java Constants.DEFAULT_REMOTE_NAME屬性的具體用法?Java Constants.DEFAULT_REMOTE_NAME怎麽用?Java Constants.DEFAULT_REMOTE_NAME使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類org.eclipse.jgit.lib.Constants
的用法示例。
在下文中一共展示了Constants.DEFAULT_REMOTE_NAME屬性的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: LambdaConfig
private LambdaConfig() {
try (InputStream is = getClass().getClassLoader().getResourceAsStream("env.properties")) {
this.props.load(is);
this.repository = new FileRepository(new File(System.getProperty("java.io.tmpdir"), "s3"));
}
catch (IOException e) {
throw new IllegalArgumentException(e);
}
overwriteWithSystemProperty(ENV_BRANCH);
overwriteWithSystemProperty(ENV_BUCKET);
overwriteWithSystemProperty(ENV_GITHUB);
this.remote = new Remote(Constants.DEFAULT_REMOTE_NAME);
this.branch = new Branch(props.getProperty(ENV_BRANCH, Constants.MASTER));
this.authentication = new SecureShellAuthentication(new Bucket(props.getProperty(ENV_BUCKET)), client);
}
示例2: getRemote
@Override
public String getRemote() {
try {
StoredConfig config = git.getRepository().getConfig();
RemoteConfig remoteConfig = new RemoteConfig( config, Constants.DEFAULT_REMOTE_NAME );
return remoteConfig.getURIs().iterator().next().toString();
} catch ( Exception e ) {
return "";
}
}
示例3: shouldBeValid
@Test
public void shouldBeValid() throws Exception {
Remote remote = new Remote(Constants.R_REMOTES + Constants.DEFAULT_REMOTE_NAME);
assertThat(remote.getShortRef(), is(Constants.DEFAULT_REMOTE_NAME));
assertThat(remote.getFullRef(), is(Constants.R_REMOTES + Constants.DEFAULT_REMOTE_NAME));
}