We should update the Javadoc to make it clear that the returned DirCache instance is cached by Repository and is thus *not* thread-safe (because DirCache is not thread-safe).  Callers who need a unique copy of the DirCache to support concurrent access from different threads should be directed to the lower level invocation:

  DirCache.read(repo.getIndexFile(), repo.getFS())

to construct their own private copy of the structure.