Java 类org.eclipse.jgit.lib.ReflogReader 实例源码

项目:incubator-netbeans    文件:UpdateRefTest.java   
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());
}
项目:incubator-netbeans    文件:UpdateRefTest.java   
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());
}
项目:GitDirStat    文件:Ref.java   
public List<ReflogEntry> getReflogEntries() throws IOException {
    Repository repo = gitRepository.getRepository();
    ReflogReader reflogReader = repo.getReflogReader(getName());
    List<ReflogEntry> reverseEntries = reflogReader.getReverseEntries();
    return reverseEntries;
}
项目:GitDirStat    文件:Ref.java   
public List<ReflogEntry> getReflogEntries() throws IOException {
    Repository repo = gitRepository.getRepository();
    ReflogReader reflogReader = repo.getReflogReader(getName());
    List<ReflogEntry> reverseEntries = reflogReader.getReverseEntries();
    return reverseEntries;
}