Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » JGit How to identify reverted commit and it reverted commit
JGit How to identify reverted commit and it reverted commit [message #1775033] Mon, 23 October 2017 18:38
vijay sahu is currently offline vijay sahuFriend
Messages: 1
Registered: October 2017
Junior Member
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;
Previous Topic:Update on project creation status
Next Topic:Eclipse won't load .gitconfig
Goto Forum:
  


Current Time: Mon Nov 19 00:40:34 GMT 2018

Powered by FUDForum. Page generated in 0.02312 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top