| 132 | } |
| 133 | |
| 134 | static bool gf_gate(cbm_git_facts_t *facts, cbm_git_facts_error_t *error) { |
| 135 | if (facts->stopped.status != CBM_GIT_FACTS_OK) { |
| 136 | *error = facts->stopped; |
| 137 | return false; |
| 138 | } |
| 139 | if (facts->options.cancelled && facts->options.cancelled(facts->options.cancel_context)) { |
| 140 | gf_error(error, CBM_GIT_FACTS_CANCELLED, "Git facts request cancelled"); |
| 141 | facts->stopped = *error; |
| 142 | return false; |
| 143 | } |
| 144 | if (cbm_now_ms() >= facts->options.deadline_ms) |
| 145 | return gf_error(error, CBM_GIT_FACTS_DEADLINE, "Git facts deadline expired"); |
| 146 | return true; |
| 147 | } |
| 148 | |
| 149 | /* A batch charges logical requests before allocating, including allocations |
| 150 | * in inherited guards. Legacy calls retain their original allocation policy. */ |
no test coverage detected