*/
public static Map<File, StatusInfo> getInterestingStatus(File root, File dir) {
String relPath = getRelative(root, dir);
Repository repo = Git.getInstance().getRepository(root);
IndexDiff index;
Map<File, StatusInfo> files = new HashMap<File, StatusInfo>();
try {
index = new IndexDiff(repo);
index.diff();
put(index.getAdded(), relPath, files, root,
StatusInfo.STATUS_VERSIONED_ADDEDLOCALLY);
put(index.getRemoved(), relPath, files, root,
StatusInfo.STATUS_VERSIONED_REMOVEDLOCALLY);
put(index.getMissing(), relPath, files, root,
StatusInfo.STATUS_VERSIONED_DELETEDLOCALLY);
put(index.getChanged(), relPath, files, root,
StatusInfo.STATUS_VERSIONED_MODIFIEDLOCALLY);
put(index.getModified(), relPath, files, root,
StatusInfo.STATUS_VERSIONED_MODIFIEDLOCALLY);
final FileTreeIterator workTree = new FileTreeIterator(repo.getWorkDir());
final TreeWalk walk = new TreeWalk(repo);
walk.reset(); // drop the first empty tree
walk.setRecursive(true);
walk.addTree(workTree);
DirCache cache = DirCache.read(repo);
while (walk.next()) {
String path = walk.getPathString();
if (relPath.length() > 0 && !path.startsWith(relPath)) {
continue;
}
if (index.getAdded().contains(path) ||
index.getRemoved().contains(path) ||
index.getMissing().contains(path) ||
index.getChanged().contains(path) ||
index.getModified().contains(path)) {
continue;
}
DirCacheEntry entry = cache.getEntry(path);
if (entry != null) {
continue;