Skip to main content



      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 14:38
Eclipse UserFriend
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: Sun Jul 13 13:55:47 EDT 2025

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

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

Back to the top