| 281 | } |
| 282 | |
| 283 | static int pipeline_refresh_git_context(cbm_pipeline_t *p) { |
| 284 | cbm_git_context_t fresh = {0}; |
| 285 | if (!p || cbm_git_context_resolve(p->repo_path, &fresh) != 0) { |
| 286 | cbm_git_context_free(&fresh); |
| 287 | return CBM_NOT_FOUND; |
| 288 | } |
| 289 | char *fresh_branch_qn = cbm_git_context_branch_qn(p->project_name, &fresh); |
| 290 | if (!fresh_branch_qn) { |
| 291 | cbm_git_context_free(&fresh); |
| 292 | return CBM_NOT_FOUND; |
| 293 | } |
| 294 | cbm_git_context_free(&p->git_ctx); |
| 295 | free(p->branch_qn); |
| 296 | p->git_ctx = fresh; |
| 297 | p->branch_qn = fresh_branch_qn; |
| 298 | return 0; |
| 299 | } |
| 300 | |
| 301 | void cbm_pipeline_set_persistence(cbm_pipeline_t *p, bool enabled) { |
| 302 | if (p) { |
no test coverage detected