Commit 52ee181
committed
Only apply IndexDiffFilter when scanning directories
When getStatus() is called with specific files rather than directories,
tests expect those files to be present in the result even when clean
(all-NORMAL status). IndexDiffFilter filters out clean entries entirely,
breaking that contract.
Restrict IndexDiffFilter to directory-only scans. This pleases the tests but still applies the optimization in the Commit dilog, which calls getStatus() on a directory with potentially many files.
A better approach would be to preload file status and parallelize computing hashes with fti.isModified(indexEntry, true,...), so that it doesn't block main thread. This, however, requires a lot of refactoring, so let's try a simple approach first.1 parent 8465e80 commit 52ee181
1 file changed
Lines changed: 13 additions & 4 deletions
Lines changed: 13 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
142 | 151 | | |
143 | 152 | | |
144 | 153 | | |
| |||
0 commit comments