本文整理汇总了Java中org.eclipse.jgit.lib.ReflogReader类的典型用法代码示例。如果您正苦于以下问题:Java ReflogReader类的具体用法?Java ReflogReader怎么用?Java ReflogReader使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ReflogReader类属于org.eclipse.jgit.lib包,在下文中一共展示了ReflogReader类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testMoveMergeCommit
import org.eclipse.jgit.lib.ReflogReader; //导入依赖的package包/类
public void testMoveMergeCommit () throws Exception {
File f = new File(workDir, "f");
write(f, "init");
add(f);
commit(f);
write(f, "modif");
add(f);
commit(f);
GitClient client = getClient(workDir);
GitRevisionInfo info = client.log("HEAD", NULL_PROGRESS_MONITOR);
client.reset("HEAD~1", GitClient.ResetType.HARD, NULL_PROGRESS_MONITOR);
GitRefUpdateResult res = client.updateReference("master", info.getRevision(), NULL_PROGRESS_MONITOR);
assertEquals(GitRefUpdateResult.FAST_FORWARD, res);
ReflogReader reflogReader = repository.getReflogReader("master");
assertEquals("merge " + info.getRevision() + ": Fast-forward", reflogReader.getLastEntry().getComment());
}
示例2: testMoveMergeRef
import org.eclipse.jgit.lib.ReflogReader; //导入依赖的package包/类
public void testMoveMergeRef () throws Exception {
File f = new File(workDir, "f");
write(f, "init");
add(f);
commit(f);
write(f, "modif");
add(f);
commit(f);
GitClient client = getClient(workDir);
client.createBranch("BRANCH", "HEAD", NULL_PROGRESS_MONITOR);
client.reset("HEAD~1", GitClient.ResetType.HARD, NULL_PROGRESS_MONITOR);
GitRefUpdateResult res = client.updateReference("master", "BRANCH", NULL_PROGRESS_MONITOR);
assertEquals(GitRefUpdateResult.FAST_FORWARD, res);
ReflogReader reflogReader = repository.getReflogReader("master");
assertEquals("merge BRANCH: Fast-forward", reflogReader.getLastEntry().getComment());
}
示例3: getReflogEntries
import org.eclipse.jgit.lib.ReflogReader; //导入依赖的package包/类
public List<ReflogEntry> getReflogEntries() throws IOException {
Repository repo = gitRepository.getRepository();
ReflogReader reflogReader = repo.getReflogReader(getName());
List<ReflogEntry> reverseEntries = reflogReader.getReverseEntries();
return reverseEntries;
}