當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。