Skip to content

Commit aec3b2e

Browse files
committed
Merge branch 'jc/fsmonitor-sanity-fix'
Remove an incorrect BUG() that should not trigger. * jc/fsmonitor-sanity-fix: fsmonitor: do not compare bitmap size with size of split index
2 parents 4ab9616 + 61eea52 commit aec3b2e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

fsmonitor.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ int read_fsmonitor_extension(struct index_state *istate, const void *data,
5555
}
5656
istate->fsmonitor_dirty = fsmonitor_dirty;
5757

58-
if (istate->fsmonitor_dirty->bit_size > istate->cache_nr)
58+
if (!istate->split_index &&
59+
istate->fsmonitor_dirty->bit_size > istate->cache_nr)
5960
BUG("fsmonitor_dirty has more entries than the index (%"PRIuMAX" > %u)",
6061
(uintmax_t)istate->fsmonitor_dirty->bit_size, istate->cache_nr);
6162

@@ -83,7 +84,8 @@ void write_fsmonitor_extension(struct strbuf *sb, struct index_state *istate)
8384
uint32_t ewah_size = 0;
8485
int fixup = 0;
8586

86-
if (istate->fsmonitor_dirty->bit_size > istate->cache_nr)
87+
if (!istate->split_index &&
88+
istate->fsmonitor_dirty->bit_size > istate->cache_nr)
8789
BUG("fsmonitor_dirty has more entries than the index (%"PRIuMAX" > %u)",
8890
(uintmax_t)istate->fsmonitor_dirty->bit_size, istate->cache_nr);
8991

0 commit comments

Comments
 (0)