소스 검색

Provide file mode of paths in index from IndexDiff

Change-Id: I1d543e2f721987114cc1e1cb0848c234470df794
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
tags/v1.3.0.201202121842-rc4
Kevin Sawicki 12 년 전
부모
커밋
69451b8302
1개의 변경된 파일11개의 추가작업 그리고 0개의 파일을 삭제
  1. 11
    0
      org.eclipse.jgit/src/org/eclipse/jgit/lib/IndexDiff.java

+ 11
- 0
org.eclipse.jgit/src/org/eclipse/jgit/lib/IndexDiff.java 파일 보기

@@ -438,4 +438,15 @@ public class IndexDiff {
return ((indexDiffFilter == null) ? Collections.<String> emptySet()
: new HashSet<String>(indexDiffFilter.getUntrackedFolders()));
}

/**
* Get the file mode of the given path in the index
*
* @param path
* @return file mode
*/
public FileMode getIndexMode(final String path) {
final DirCacheEntry entry = dirCache.getEntry(path);
return entry != null ? entry.getFileMode() : FileMode.MISSING;
}
}

Loading…
취소
저장