本文整理了Java中org.eclipse.jgit.api.Git.tagDelete()
方法的一些代码示例,展示了Git.tagDelete()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Git.tagDelete()
方法的具体详情如下:
包路径:org.eclipse.jgit.api.Git
类名称:Git
方法名:tagDelete
[英]Return a command object used to delete tags
[中]返回用于删除标记的命令对象
代码示例来源:origin: centic9/jgit-cookbook
try (Git git = new Git(repository)) {
git.tagDelete().setTags("tag_for_testing").call();
git.tagDelete().setTags("tag_for_testing").call();
git.tagDelete().setTags("tag_for_testing").call();
git.tagDelete().setTags("tag_for_testing").call();
代码示例来源:origin: centic9/jgit-cookbook
try (Git git = new Git(repository)) {
git.tagDelete().setTags("tag_for_testing").call();
git.tagDelete().setTags("tag_for_testing").call();
git.tagDelete().setTags("tag_for_testing").call();
git.tagDelete().setTags("tag_for_testing").call();
代码示例来源:origin: org.apache.camel/camel-git
protected void doDeleteTag(Exchange exchange, String operation) throws Exception {
if (ObjectHelper.isEmpty(endpoint.getTagName())) {
throw new IllegalArgumentException("Tag Name must be specified to execute " + operation);
}
try {
git.tagDelete().setTags(endpoint.getTagName()).call();
} catch (Exception e) {
LOG.error("There was an error in Git {} operation", operation);
throw e;
}
}
代码示例来源:origin: org.wildfly.core/wildfly-server
@Override
public void deleteSnapshot(String name) {
try (Git git = gitRepository.getGit()) {
git.tagDelete().setTags(name).call();
} catch (GitAPIException ex) {
MGMT_OP_LOGGER.failedToDeleteConfigurationSnapshot(ex,name);
}
}
代码示例来源:origin: wildfly/wildfly-core
@Override
public void deleteSnapshot(String name) {
try (Git git = gitRepository.getGit()) {
git.tagDelete().setTags(name).call();
} catch (GitAPIException ex) {
MGMT_OP_LOGGER.failedToDeleteConfigurationSnapshot(ex,name);
}
}
代码示例来源:origin: org.apereo.cas/cas-mgmt-support-version-control
/**
* Method will tag the current HEAD commit has being the latest published.
*/
@SneakyThrows
public void setPublished() {
if (!isUndefined()) {
git.tagDelete().setTags("published").call();
git.tag().setName("published").call();
}
}
代码示例来源:origin: jenkinsci/git-client-plugin
/** {@inheritDoc} */
@Override
public void deleteTag(String tagName) throws GitException {
try (Repository repo = getRepository()) {
git(repo).tagDelete().setTags(tagName).call();
} catch (GitAPIException e) {
throw new GitException(e);
}
}
代码示例来源:origin: theonedev/onedev
public void deleteTag(String tag) {
String refName = GitUtils.tag2ref(tag);
ObjectId commitId = getRevCommit(refName).getId();
try {
git().tagDelete().setTags(tag).call();
} catch (GitAPIException e) {
throw new RuntimeException(e);
}
Subject subject = SecurityUtils.getSubject();
OneDev.getInstance(UnitOfWork.class).doAsync(new Runnable() {
@Override
public void run() {
ThreadContext.bind(subject);
try {
Project project = OneDev.getInstance(ProjectManager.class).load(getId());
OneDev.getInstance(ListenerRegistry.class).post(
new RefUpdated(project, refName, commitId, ObjectId.zeroId()));
} finally {
ThreadContext.unbindSubject();
}
}
});
}
代码示例来源:origin: org.openmrs.maven.plugins/openmrs-sdk-maven-plugin
/**
* @inheritDoc
*/
@Override
public boolean deleteTag(Git git, String tag, String username, String password){
Ref tagRef = git.getRepository().getTags().get(tag);
if(tagRef != null){
try {
//delete remote tag, if
UsernamePasswordCredentialsProvider credentialsProvider = new UsernamePasswordCredentialsProvider(username, password);
git.push()
.setCredentialsProvider(credentialsProvider)
.add(":"+tagRef)
.setRemote("upstream")
.call();
git.tagDelete().setTags(tagRef.getName()).call();
return true;
} catch (GitAPIException e) {
throw new RuntimeException("Failed to delete tag "+tag, e);
}
} else {
return false;
}
}
代码示例来源:origin: sheimi/SGit
break;
case Repo.COMMIT_TYPE_TAG:
mRepo.getGit().tagDelete()
.setTags(mChosenCommit)
.call();
代码示例来源:origin: maks/MGit
break;
case Repo.COMMIT_TYPE_TAG:
mRepo.getGit().tagDelete()
.setTags(mChosenCommit)
.call();
代码示例来源:origin: sheimi/SGit
.setTagger(tag.getTaggerIdent())
.call();
mRepo.getGit().tagDelete()
.setTags(mFromCommit)
.call();
代码示例来源:origin: maks/MGit
.setTagger(tag.getTaggerIdent())
.call();
mRepo.getGit().tagDelete()
.setTags(mFromCommit)
.call();
代码示例来源:origin: apache/maven-scm
if ( git.tagDelete().setTags( escapedTagName ).call().isEmpty() )
代码示例来源:origin: io.fabric8.patch/patch-management
for (Map.Entry<String, RevTag> entry : tags.entrySet()) {
if (entry.getKey().startsWith("patch-")) {
fork.tagDelete().setTags(entry.getKey()).call();
fork.push()
.setRefSpecs(new RefSpec()
代码示例来源:origin: jboss-fuse/fabric8
for (Map.Entry<String, RevTag> entry : tags.entrySet()) {
if (entry.getKey().startsWith("patch-")) {
fork.tagDelete().setTags(entry.getKey()).call();
fork.push()
.setRefSpecs(new RefSpec()
代码示例来源:origin: io.fabric8.patch/patch-management
fork.tagDelete()
.setTags(currentBaseline.getTagName())
.call();
for (Map.Entry<String, RevTag> entry : tags.entrySet()) {
if (entry.getKey().startsWith("patch-")) {
fork.tagDelete().setTags(entry.getKey()).call();
fork.push()
.setRefSpecs(new RefSpec()
fork.tagDelete()
.setTags(patchTagName)
.call();
代码示例来源:origin: jboss-fuse/fabric8
fork.tagDelete()
.setTags(currentBaseline.getTagName())
.call();
for (Map.Entry<String, RevTag> entry : tags.entrySet()) {
if (entry.getKey().startsWith("patch-")) {
fork.tagDelete().setTags(entry.getKey()).call();
fork.push()
.setRefSpecs(new RefSpec()
fork.tagDelete()
.setTags(patchTagName)
.call();
内容来源于网络,如有侵权,请联系作者删除!