| 2032 | } |
| 2033 | |
| 2034 | static bool gf_batch_execute(cbm_git_facts_t *facts, const cbm_git_blob_batch_request_t *request, |
| 2035 | const cbm_git_blob_batch_limits_t *limits, cbm_git_blob_batch_t *out, |
| 2036 | cbm_git_facts_error_t *error) { |
| 2037 | if (!gf_history_guard(facts, error)) |
| 2038 | return false; |
| 2039 | if (request->count > limits->max_entries || request->count > SIZE_MAX / sizeof(size_t) || |
| 2040 | request->count > SIZE_MAX / sizeof(gf_batch_pick_t) || |
| 2041 | request->count > SIZE_MAX / sizeof(cbm_git_blob_batch_item_t)) |
| 2042 | return gf_limit(facts, error, "Git batch entry limit exceeded"); |
| 2043 | gf_batch_work_t work = {.facts = facts, .request = request}; |
| 2044 | if (!gf_batch_inventory(&work, error)) |
| 2045 | return false; |
| 2046 | if (request->count && |
| 2047 | (!gf_batch_selection(&work, error) || !gf_batch_unique(&work, error) || |
| 2048 | !gf_batch_preflight(&work, error) || !gf_batch_read_payloads(&work, error))) |
| 2049 | return false; |
| 2050 | return gf_batch_publish(&work, out, error); |
| 2051 | } |
| 2052 | |
| 2053 | bool cbm_git_facts_read_blob_batch(cbm_git_facts_t *facts, |
| 2054 | const cbm_git_blob_batch_request_t *request, |
no test coverage detected