summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2019-12-01 09:04:39 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2019-12-01 09:04:39 -0800
commitaec3b2e24f83e8b5985257b8270029c968e980b3 (patch)
treedb6a2f026c949d3d8b1f3a3c89c6b75e54ebeca3
parentMerge branch 'sg/skip-skipped-prereq' (diff)
parentfsmonitor: do not compare bitmap size with size of split index (diff)
downloadtgif-aec3b2e24f83e8b5985257b8270029c968e980b3.tar.xz
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
-rw-r--r--fsmonitor.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/fsmonitor.c b/fsmonitor.c
index 1f4aa1b150..0477500b39 100644
--- a/fsmonitor.c
+++ b/fsmonitor.c
@@ -55,7 +55,8 @@ int read_fsmonitor_extension(struct index_state *istate, const void *data,
}
istate->fsmonitor_dirty = fsmonitor_dirty;
- if (istate->fsmonitor_dirty->bit_size > istate->cache_nr)
+ if (!istate->split_index &&
+ istate->fsmonitor_dirty->bit_size > istate->cache_nr)
BUG("fsmonitor_dirty has more entries than the index (%"PRIuMAX" > %u)",
(uintmax_t)istate->fsmonitor_dirty->bit_size, istate->cache_nr);
@@ -83,7 +84,8 @@ void write_fsmonitor_extension(struct strbuf *sb, struct index_state *istate)
uint32_t ewah_size = 0;
int fixup = 0;
- if (istate->fsmonitor_dirty->bit_size > istate->cache_nr)
+ if (!istate->split_index &&
+ istate->fsmonitor_dirty->bit_size > istate->cache_nr)
BUG("fsmonitor_dirty has more entries than the index (%"PRIuMAX" > %u)",
(uintmax_t)istate->fsmonitor_dirty->bit_size, istate->cache_nr);