当前位置: 首页>>代码示例>>Java>>正文


Java RevCommit.getFullMessage方法代码示例

本文整理汇总了Java中org.eclipse.jgit.revwalk.RevCommit.getFullMessage方法的典型用法代码示例。如果您正苦于以下问题:Java RevCommit.getFullMessage方法的具体用法?Java RevCommit.getFullMessage怎么用?Java RevCommit.getFullMessage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.jgit.revwalk.RevCommit的用法示例。


在下文中一共展示了RevCommit.getFullMessage方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: GitTool

import org.eclipse.jgit.revwalk.RevCommit; //导入方法依赖的package包/类
public GitTool() {
    File gitWorkDir = new File(".");
    try {
        Git git = Git.open(gitWorkDir);
        Iterable<RevCommit> commits = git.log().all().call();
        Repository repo = git.getRepository();
        branch = repo.getBranch();
        RevCommit latestCommit = commits.iterator().next();
        name = latestCommit.getName();
        message = latestCommit.getFullMessage();
    } catch (Throwable e) {
        name = "";
        message = "";
        branch = "";
    }
}
 
开发者ID:yacy,项目名称:yacy_grid_mcp,代码行数:17,代码来源:GitTool.java

示例2: getDetailMessage

import org.eclipse.jgit.revwalk.RevCommit; //导入方法依赖的package包/类
@Nullable
public static String getDetailMessage(RevCommit commit) {
	int start = 0;
	String fullMessage = commit.getFullMessage();
	while (true) {
		int index = fullMessage.indexOf('\n', start);
		if (index == -1)
			return null;
		start = index+1;
		int nextIndex = fullMessage.indexOf('\n', start);
		if (nextIndex == -1)
			return null;
		start = nextIndex+1;
		if (fullMessage.substring(index, nextIndex).trim().length() == 0) {
			String detailMessage = fullMessage.substring(start).trim();
			return detailMessage.length()!=0?detailMessage:null;
		}
	}
}
 
开发者ID:jmfgdev,项目名称:gitplex-mit,代码行数:20,代码来源:GitUtils.java

示例3: extractTestResultsExpectations

import org.eclipse.jgit.revwalk.RevCommit; //导入方法依赖的package包/类
private Collection<TestResult> extractTestResultsExpectations(RevCommit commit) {
    final Set<TestResult> testResultExpectations = new HashSet<>();
    final String fullMessage = commit.getFullMessage();

    final Matcher matcher = TEST_RESULT_ENTRY_PATTERN.matcher(fullMessage);
    while (matcher.find()) {
        final String[] testResultParts = matcher.group().trim().split(" ");
        testResultExpectations.add(TestResult.from(testResultParts));
    }
    return testResultExpectations;
}
 
开发者ID:arquillian,项目名称:smart-testing,代码行数:12,代码来源:TestResultsExtractor.java

示例4: getCommitMessage

import org.eclipse.jgit.revwalk.RevCommit; //导入方法依赖的package包/类
@Override
public String getCommitMessage( String commitId ) {
  if ( commitId.equals( IVCS.WORKINGTREE ) ) {
    try {
      String merge_msg = git.getRepository().readMergeCommitMsg();
      return merge_msg == null ? "" : merge_msg;
    } catch ( Exception e ) {
      return e.getMessage();
    }
  } else {
    RevCommit commit = resolve( commitId );
    return commit.getFullMessage();
  }
}
 
开发者ID:HiromuHota,项目名称:pdi-git-plugin,代码行数:15,代码来源:UIGit.java


注:本文中的org.eclipse.jgit.revwalk.RevCommit.getFullMessage方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。