If this.filter is a PathFilter (which is usually what type it is when its non-null) we won't iterate the entire repository.  Instead we'll skip over large chunks of it based on what the PathFilter says is relevant.  Is it OK in those cases for the progress monitor to be inaccurate?

Its ugly, but we might be able to do better by peeking at the DirCacheIterator's state.  It has an index that tells us how far into the DirCache we currently are... which is exactly what the progress should be.  When this.filter is a PathFilter and we skip over an entire subdirectory that isn't relevant, DirCacheIterator's state reflects the number of paths that were skipped over and thus would give us a more accurate progress update.  But doing so requires poking DirCacheIterator's API, and I'm not sure we want to expose internal state like that.