| 874 | } |
| 875 | |
| 876 | static int pipeline_refresh_git_context(cbm_pipeline_t *p) { |
| 877 | cbm_git_context_t fresh = {0}; |
| 878 | if (!p || cbm_git_context_resolve(p->repo_path, &fresh) != 0) { |
| 879 | cbm_git_context_free(&fresh); |
| 880 | return CBM_NOT_FOUND; |
| 881 | } |
| 882 | char *fresh_branch_qn = cbm_git_context_branch_qn(p->project_name, &fresh); |
| 883 | if (!fresh_branch_qn) { |
| 884 | cbm_git_context_free(&fresh); |
| 885 | return CBM_NOT_FOUND; |
| 886 | } |
| 887 | cbm_git_context_free(&p->git_ctx); |
| 888 | free(p->branch_qn); |
| 889 | p->git_ctx = fresh; |
| 890 | p->branch_qn = fresh_branch_qn; |
| 891 | return 0; |
| 892 | } |
| 893 | |
| 894 | void cbm_pipeline_set_persistence(cbm_pipeline_t *p, bool enabled) { |
| 895 | if (p) { |
no test coverage detected