提交 391408e5 编写于 作者: N Nguyễn Thái Ngọc Duy 提交者: Junio C Hamano

read-cache.c: turn die("internal error") to BUG()

Signed-off-by: NNguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 ad8f8f4a
......@@ -316,7 +316,7 @@ static int ce_match_stat_basic(const struct cache_entry *ce, struct stat *st)
changed |= DATA_CHANGED;
return changed;
default:
die("internal error: ce_mode is %o", ce->ce_mode);
BUG("unsupported ce_mode: %o", ce->ce_mode);
}
changed |= match_stat_data(&ce->ce_stat_data, st);
......@@ -2356,14 +2356,14 @@ void validate_cache_entries(const struct index_state *istate)
for (i = 0; i < istate->cache_nr; i++) {
if (!istate) {
die("internal error: cache entry is not allocated from expected memory pool");
BUG("cache entry is not allocated from expected memory pool");
} else if (!istate->ce_mem_pool ||
!mem_pool_contains(istate->ce_mem_pool, istate->cache[i])) {
if (!istate->split_index ||
!istate->split_index->base ||
!istate->split_index->base->ce_mem_pool ||
!mem_pool_contains(istate->split_index->base->ce_mem_pool, istate->cache[i])) {
die("internal error: cache entry is not allocated from expected memory pool");
BUG("cache entry is not allocated from expected memory pool");
}
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册