JGit How to identify reverted commit and it reverted commit [message #1775033] |
Mon, 23 October 2017 14:38 |
Eclipse User |
|
|
|
Bleow is my code and i need to find out a way to identify the Reverted commit and it original commit.
I need ignore both of them ....
is there a git function that can i identify the reverted commit and and its parent ??
i dnt want both of them on my list.
thanks for your help.
*************************************************
Loger.write(" Store Git data in an array");
GitArtifact artificts[] = new GitArtifact[count];
count = 0;
for (RevCommit commit : commits) {
if (lgbCommit.equals(commit.getId().name()))
break;
GitArtifact artifact = new GitArtifact();
Date commitTime = new Date(commit.getCommitTime() * 1000L);
artifact.setCommitID(commit.getId());
artifact.setDeveloper(commit.getCommitterIdent().getName());
artifact.setEmail(commit.getCommitterIdent().getEmailAddress());
artifact.setCommit(commit.getName());
artifact.setCommitTime(commitTime.toString());
artifact.setCommitMessage(commit.getShortMessage());
artificts[count] = artifact;
RevFlag flag = null;
Loger.write(
//" Commit Name: '"+artifact.getCommit()+"'"+
" Commit Message: "+commit.getShortMessage()+"' Git commit id: "
+ commit.getId() +" Name: "
+commit.getName() +" parant "
+commit.getParent(0) +" "
);
count++;
}
inculdeArtifactsDetails(artificts);
return artificts;
inculdeArtifactsDetails(artificts);
return artificts;
|
|
|
Powered by
FUDForum. Page generated in 0.02771 seconds