Example usage for org.eclipse.jgit.revwalk FollowFilter create

List of usage examples for org.eclipse.jgit.revwalk FollowFilter create

Introduction

In this page you can find the example usage for org.eclipse.jgit.revwalk FollowFilter create.

Prototype

public static FollowFilter create(String path, DiffConfig cfg) 

Source Link

Document

Create a new tree filter for a user supplied path.

Usage

From source file:MyDiffFormatter.java

License:Eclipse Distribution License

private List<DiffEntry> updateFollowFilter(List<DiffEntry> files) {
    String oldPath = ((FollowFilter) pathFilter).getPath();
    for (DiffEntry ent : files) {
        if (isRename(ent) && ent.getNewPath().equals(oldPath)) {
            pathFilter = FollowFilter.create(ent.getOldPath(), diffCfg);
            return Collections.singletonList(ent);
        }/* w w  w  .  ja v a2  s . c  o  m*/
    }
    return Collections.emptyList();
}